This sample will show you to easily create grants with the Nylas Node.js SDK.
API_KEY="YOUR_API_KEY"
CLIENT_ID="YOUR_CLIENT_ID"
CLIENT_SECRET="YOUR_CLIENT_SECRET"
npm install
Run the following command and go to http://localhost:3000/oauth
npm start
ON BROWSER
{
accessToken: 'token',
grantId: 'id',
email: '[email protected]',
expiresIn: 3600,
idToken: 'token',
tokenType: 'Bearer',
scope: 'scope1 scope2'
}
TERMINAL OUTPUT
GRANT ID: <GRANT_ID>