Skip to content
Skip to main content

Creating grants with Bring Your Own Authentication

If you already have a refresh token (or credentials, if using IMAP) for your users from your own authentication implementation, you can use it with the Nylas APIs to create a grant and get the grant_id, which you then use in requests to the provider. If you are handling the OAuth flow in your own application or want to migrate existing users, Bring Your Own Authentication allows you to simply provide the user refresh_token to create a grant.

If you’re using multiple provider applications with a single connector, you can include the credential_id in the settings object when making a Bring Your Own Authentication request to specify which provider application should be used.

Create grant with Bring Your Own Authentication

Section titled “Create grant with Bring Your Own Authentication”

Create Bring Your Own Authentication login page

Section titled “Create Bring Your Own Authentication login page”

Nylas provides a login page for Hosted authentication that uses the detect provider API to route user logins to the correct provider.

If you’re using Bring Your Own (BYO) authentication instead, you must create a login page for your app where your users enter their login credentials. This should be branded, and can use the Detect Provider endpoint to help route user logins to use the correct connector.