How can I create a Nylas grant with the scopes I want?

Setting up a Nylas connection with specific, limited scopes is easy, but it requires accurately passing the desired Provider Scopes during the Grant creation process. A Grant represents the permissions a user has given your application to access their data.

Nylas V3 uses the specific scopes required by the provider (like Google or Microsoft), which allows you to achieve granular permission control.

  1. Check Connector Prerequisites: Before starting, ensure you have set up a Connector (e.g., Google) in your Nylas Dashboard. This is a required first step.

  2. Identify the Provider Scopes: Find the exact scopes provided by the vendor (Google, Microsoft, etc.) that correspond to the data you want. For example, if you only want read access to Email and Calendar on Google, you would use

    https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/calendar.readonly
  3. Prepare the API Request: When initiating the authentication flow, you must include the required scopes in the API payload.

The resulting Grant will only have permissions necessary for those scopes.

Resources:

Nylas scopes.

Authenticating with Nylas.

 

 

Updated

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.