Custom Authentication

POST {{baseUrl}}/v3/connect/custom

Manually create a grant using a custom authentication flow. If you are handling the OAuth flow in your own application or want to migrate existing users, Custom Authentication allows you to provide the user refresh_token in order to create a grant.

If a user previously authenticated with your Nylas application using the same email account, Nylas detects this and re-authenticates the existing grant instead of creating a new one. The API response contains the existing grant_id for the user.

Request Body

{"provider"=>"<string>", "settings"=>"<object>", "state"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;request_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;provider&quot;:&quot;\u003cstring\u003e&quot;,&quot;scope&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;created_at&quot;:&quot;\u003cinteger\u003e&quot;,&quot;grant_status&quot;:&quot;\u003cstring\u003e&quot;,&quot;email&quot;:&quot;\u003cstring\u003e&quot;,&quot;user_agent&quot;:&quot;\u003cstring\u003e&quot;,&quot;ip&quot;:&quot;\u003cstring\u003e&quot;,&quot;state&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cinteger\u003e&quot;}}