Migrate v2 account to v3 grant
Migrates a single v2 connected account to a v3 grant. Use this endpoint to migrate a few accounts to v3 as a test, then use the Batch Clone endpoint to migrate the rest.
Before you use this endpoint, your v2 Nylas applications need to be linked to their corresponding v3 applications and you need to have a working equivalent authentication connector for each provider you use. If you need help with this process, learn how to get support.
During migration, Nylas maps the v2 provider to its v3 equivalent using the connected account's v2 authorization type and provider. All sensitive data (such as tokens and passwords) is encrypted and securely transfered only within the Nylas infrastructure. No secrets exit the internal Nylas network.
This endpoint is rate limited to 20 requests per second, per Nylas application ID.
Create placeholder grants
Nylas can migrate existing Microsoft Graph, Office 365, and EWS accounts that use token authentication. It can't fully migrate some types of Microsoft accounts because of provider limitations and scope changes in v3.
By default, Nylas creates an invalid v3 Grant with fake credentials for accounts that it can't automatically migrate. These grants act as "placeholders" that the user can manually authenticate to later. You can turn this feature off for Microsoft accounts only by setting the clone_exchange query parameter to false, or for all providers by setting allow_invalid_grant_creation to false.
Path parameters
Query parameters
(Not supported for Microsoft) When true, Nylas creates invalid v3 grants with fake credentials for all connected accounts in your request. These grants act as placeholders that users can authenticate to later.
(Microsoft only) When true, Nylas creates invalid v3 grants with fake credentials for any Microsoft accounts that can't be automatically migrated. These grants act as placeholders that users can authenticate to later.
Response
On success, returns the v3 Grant object Nylas created as part of the migration.
Example response
{
"request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
"data": {
"account_id": "df0yq6c9okc6t9j4ejd5nyrt7",
"created_at": 1617817109,
"email": "nyla@example.com",
"grant_status": "valid",
"id": "e19f8e1a-eb1c-41c0-b6a6-d2e59daf7f47",
"ip": "1.1.1.1",
"name": "Nyla",
"provider": "microsoft",
"provider_user_id": "b16f171c-6640-4edd-a598-e507b546d841",
"scope": [
"Mail.Read",
"User.Read",
"offline_access"
],
"email_aliases": [
"email_alias1@example.com",
"email_alias2@example.com"
],
"state": "my-state",
"updated_at": 1617817109,
"workspace_id": "abf6ff99-05ad-4c0a-aaf8-400aacf2470a",
"credential_id": "c123f8e1a-eb1c-41c0-b6a6-d2e59daf7f47"
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.