This sample repo will show you how to easily delete an email with the Nylas Node.js SDK.
- Node.js v16.x
You'll need the following values, including the ID of the message you like to delete:
ACCESS_TOKEN = ""
CLIENT_ID = ""
CLIENT_SECRET = ""
MESSAGE_ID = ""
Add the above values to a .env file:
$ npm iRun the script using following commands:
$ npm run build
$ node build/index.jsWhen you run the script, you'll get account information output in your terminal:
Message "<MESSAGE_ID>" was deleted.Visit our Nylas Node.js SDK documentation to learn more.