This sample repo will show you how to easily to get started with the Nylas Node.js SDK.
- Node.js v16.x
You'll need the following values:
ACCESS_TOKEN = ""
CLIENT_ID = ""
CLIENT_SECRET = ""
Add the above values to a .env
file:
$ npm i
Run the script using following commands:
$ npm run build
$ node build/index.js
When you run the script, you'll get account information output in your terminal:
{
...
id: '<ACCOUNT_ID>',
accountId: '<ACCOUNT_ID>',
object: 'account',
name: '<ACCOUNT_NAME>',
emailAddress: '<ACCOUNT_EMAIL>',
provider: '<EMAIL_PROVIDER>',
organizationUnit: 'label',
syncState: 'running',
linkedAt: 2022-04-21T14:48:14.000Z,
accessToken: ''
}
}
Visit our Nylas Node.js SDK documentation to learn more.