Nylas Docs

The Nylas Developer Hub

Welcome to the Nylas developer hub. You'll find comprehensive guides and documentation to help you start working with Nylas as quickly as possible, as well as support if you get stuck. Let's jump right in!

Developer Guide

Get Your Developer API Keys

Welcome to Nylas! This step-by-step guide covers how to set up a developer account in the Nylas dashboard so that you can make your first request to the Nylas API.

If you haven't already done so, please sign up or log in to the Nylas Dashboard to access your account.

This guide covers the following steps:

  1. Create an application
  2. Authenticate your first account
  3. Make your first request to the Nylas API

Create an Application

Before you authenticate your first account, you'll need to create a new Nylas Application within your organization. We recommend using different Nylas applications to separate users across your development, staging, and production environments, but for the purposes of this guide, you can set up an app simply to test out the Nylas API.

Go to your account's applications page, and click Create New Application. You will need to give your application a name, select which type of application this will be (Web, iOS, or Android), enter a description, the website URL, and a logo.

Next, return to the App Dashboard and find the Client ID and Client Secret. These values will be necessary when you're ready to work with accounts that are authenticated to your app.

The client ID and secret are highlighted in red.

The client ID and secret are highlighted in red.

Keep your organization unified!

Please don't create multiple organizations for your company. Instead, when you're ready to setup your team members, invite other developers and support staff at your company to your Nylas organization. In the Dashboard, click on your username in the top right, and then "Organization" to invite other team members to your Nylas organization.

Authenticate Your First Account

Development Use Only!

Please note: this section of this guide is intended to get you setup for development purposes and is not sufficient to set you up for production use. To learn about how to integrate Nylas into your app for production use, please refer to the app integration guide.

Now that you've set up your application, it's time to authenticate your first account so you can access email, calendar, and contacts data.

  1. Go to your Nylas dashboard and select the application you created for testing in the left side bar.
  2. Then, click Accounts in the left side bar, and select Auth Account from the Accounts page.
  3. In the new window, type in an address that you are able to log into and follow the steps to authenticate the account.

Additional OAuth requirements.

If you want to set up a Gmail account, you will first need to create a Google project and OAuth client ID.

Once you have authenticated, you will be redirected back to the Accounts page for your app. Look for the pop up at the very top of the page that provides an access token for this new account. Copy this token and store it somewhere safe; you will need it to make your first requests to the Nylas API. If you ever need to generate a new token, you can follow the same process to authenticate the account again and a new token will be generated. After authentication, the account will be listed on the Accounts page. If it has a lot of data to sync, it might be listed as being in a "Partial" state until the sync is complete.

Please note, this token should only be used for development purposes. Accounts authenticated through the Dashboard only have email, calendar and contacts scopes, so you won't be able to make requests to data like /resources. To learn about how to use access tokens in your app and which scopes are available, refer to our authentication guide which is part of our app integration guide.

The account access token is highlighted in red.

The account access token is highlighted in red.

Make Your First Request

Now that you have your first account connected, it's time to make your very first request to the Nylas API! Open the nearest terminal and type in the following command, replacing {access_token} with the token you saved from the previous section.

curl -X GET https://{access_token}:@api.nylas.com/account

If everything is setup properly, you should see a response similar to the following example.

{
    "account_id": "{my_account_id}",
    "email_address": "{email_address}",
    "id": "{id}",
    "linked_at": {time_stamp},
    "name": "{my_name}",
    "object": "account",
    "organization_unit": "label",
    "provider": "{provider}",
    "sync_state": "running"
}

Congrats! You're now connected to the Nylas APIs!

Next Steps

Here are some resources for when you're ready to move on.

  • Take a look at the quickstart guides for the Nylas email, calendar, and contacts APIs to explore the features of the Nylas communication platform.
  • Set up Postman to make it easy to explore the Nylas API.
  • When you're ready to start integrating the Nylas communication platform into your app, take a look at the app integration guide.
  • Finally, you can always take a look at the API reference to learn about how the Nylas APIs work.

Get Your Developer API Keys


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.