PATCH
/v3/grants/{grantId}Update a grant
Updates the specified grant's stored settings or scope metadata.
Common use cases:
- Rotate a refresh token — If you obtain a new
refresh_tokenfrom a provider (for example, after a user re-consents in your own OAuth flow), you can update the grant's stored token without deleting and recreating the grant. Pass the new token insettings.refresh_token. - Update stored scope list — Update the
scopearray to reflect the scopes the grant currently holds. Note: this only updates the scope metadata stored by Nylas. It does not change the actual permissions the provider has granted. To change provider permissions, the user must re-authenticate through the provider's OAuth consent flow.
When you make a PATCH request, Nylas replaces all data in the nested object with the information
included in your request. For more information, see
Updating objects.