Only show these results:

Postman and Nylas

Use our Postman collection to get started using the Nylas API quickly. Our Postman collection includes:

  • Environment variables
  • Autogenerated values
  • Tests to check for correct authentication responses.

Setup

  1. Install Postman.
  2. Add the Nylas collection. You'll be forking the Nylas collection. Forking makes it easy to know when changes are made and merge them into your local collection.

Install Nylas Environments

Postman Environments make it easy to store variables used throughout your collection, so you can have different values for production vs. staging while only needing to maintain a single collection of endpoints.

This template environment is scaffolding to get started with Nylas and provides empty variables like account_id, access_token, and url that are used as variables throughout different endpoints in the collection.

Step 1 Import the Environment

  1. Copy the Nylas Production Environment.
  2. Select Environment and then click Import.
  3. Select Raw Text, then copy and paste the Nylas Production Environment.
Postman Environment Import

Step 2 Configure the Environment

  1. Make sure you still have Environments selected and click the Nylas Template Environment.Some values are filled in and others are not.
    1. Autogenerated - Values that will be replaced as you start making requests. You can also remove autogenerated and replace them manually.
    2. URL - Already prefilled with the Nylas API server
    3. Blank - You'll need to fill those in yourself.
  2. Fill in your client_id and client_secret, which are in your Nylas dashboard.
    1. Click App Settings and find Developer Details.
  3. If you already have an access_token then you can replace autogenerated with the access_token value and start making requests.
  4. If you need an access_token and want to use Postman for authentication, see Getting Autogenerated Values

Getting Autogenerated Values

Use the steps here, if you want to authenticate accounts using native authentication and Postman.

If you already have an access_token then you can replace autogenerated with the access_token value and start making requests right away. No need to go through the following steps.

Prerequisites

Postman Native Authentication

  1. Make a request to /connect/authorize.
  2. Nylas will return a code that is automatically filled in using the {code} variable.
  3. Then make a request to /connect/token and Nylas will return an access_token.

Adjusting Environment Values

Select the eye icon, then edit to adjust values.

Postman adjust Environment variables