Quickstart
Following our quickstart guide is the fastest way to start using Nylas. If you're a first time user, sign up for an account and follow the on-screen instructions. We'll get your account connected and start to sync your data.
Welcome
When you first create an account with Nylas, you’ll land on our welcome page.
Connecting Your Account
Provide details about your role and the integrations you'd like. Once you've done that, connect your account by following the steps on-screen and verifying your credentials.
Access Token
At Step 3, you'll receive your ACCESS_TOKEN
which is required to make API requests. Make sure to save this information in a safe place as you'll use it throughout the process.
Only one connected account is allowed at a time
You can only connect one account when using the Quickstart app. If you need to connect multiple accounts, create a new app.
First API Request
After saving your ACCESS_TOKEN
, you'll be able to make your first API request at Step 4. Enter your ACCESSS_TOKEN
and click Run to make the GET
request for your account information within the browser.
Congratulations!
You've made your first API request in Nylas!
Where to Begin
Start with creating a simple API request and then viewing the response. For more advanced guides, view our guide on creating an app or check out the section at the end of this guide on what's next.
Make an API Request
Start with creating a simple curl
request for your account to view unread messages. Replace <ACCESS_TOKEN>
in the code below with your access token from your connected account.
GET Request
Use this GET
/messages example to return all messages with additional query parameters to filter data.
curl --location --request GET 'https://api.nylas.com/messages?limit=100&unread=true' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
}
Response
If everything is set up correctly, you'll see a similar response to the one below:
[
{
"account_id": "<ACCOUNT_ID>",
"bcc": [
{
"email": "Albert Einstein",
"name": "al@particletech.com"
}
],
"body": "<html>\\n<head>\\n <meta charset=\\\"UTF-8\\\">\\n <style type=\\\"text/css\\\">\\n html {\\n -webkit-text-size-adjust:none;\\n }\\n body {\\n width:100%;\\n margin:0 auto;\\n padding:0;\\n}\\n p {\\n width:280px;\\n line-height: 16px;\\n letter-spacing: 0.5px;\\n }\\n </style>\\n <title>Welcome ... </html>",
"cc": [
{
"email": "George Washington Carver",
"name": "carver@agritech.com"
}
],
"date": 1557950729,
"events": [
{}
],
"files": [
{
"content_disposition": "attachment",
"content_type": "image/jpeg",
"filename": "image.jpeg",
"id": "<IMAGE_ID>",
"size": 2648890
}
],
"folder": {
"display_name": "string",
"id": "string",
"name": "string"
},
"from": [
{
"name": "Marie Curie",
"email": "marie@radioactivity.com"
}
],
"id": "string",
"object": "message",
"reply_to": [
{
"email": "skwolek@fibers.com",
"name": "Stephanie Kwolek"
}
],
"snippet": "string",
"starred": true,
"subject": "string",
"thread_id": "string",
"to": [
{
"email": "dorothy@spacetech.com",
"name": "Dorothy Vaughan"
}
],
"unread": true,
"labels": [
{
"display_name": "Important",
"id": "<LABEL_ID>",
"name": "important"
}
]
}
]
Scopes
These authentication scopes will help get you started using Nylas:
email.modify
- Read and modify all messages, threads, file attachments, and read email metadata, such as headers. It doesn't include send privileges.email.send
- Send messages only. There are no read or modify privileges on users' emails. Usingemail.send
as the only scope with Gmail accounts may lead to unexpected threading behavior.calendar
- Read and modify calendars and events.room_resources.read_only
- Read available room resources for an account. Room resources for Office 365 are Admin Consent Required permissions.contacts
- Read and modify contacts.
Once you're ready to build for production, follow our guide on creating an app to authenticate an account with more scopes.
What's Next?
When you've got your configurations complete, check out these features you can add to your application for more streamlined experiences for your users:
- Webhooks - Receive notifications when certain events occur.
- Scheduler - Add full calendar functionality for users in your application.
- Components - Build out seamless experiences with reusable and customizable elements.
- SDK - SDK tools for Python, Node.js, Ruby, and Java.