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

Create a Google Application

Before you create your application with Google there are a few things to keep in mind.

Hosted or Native Authentication

Decide which method of authentication works for you.

Hosted Authentication

The fastest way to get started. If you aren't interested in whitelisting your application, or just want to test with a few users, use Hosted Authentication.

:arrow-right: Review our Hosted Authentication Guide.

Native Authentication

Use this method if you want to whitelist your application. This means your users will see your company name instead of Nylas on the OAuth screen. Native Authentication requires that you have an application built with a callback URL.

:arrow-right: Review our Native Authentication Guide.

🚧

Switching Authorization

Switching between Native and Hosted Auth will require a new application and for accounts to be reauthorized.

Internal or External Application

Decide if you want your application available to anyone or only users part of your organization.

Internal Application

Use internal users for Google account access for development or production applications that are internal only. Only users who have an account within your organization, @your-organization.com, can access the application.

When users from your organization authorize against your application they will not see the unverified application warning.

Use internal applications to skip the App Verification and Security Review process. If anyone outside your organization needs to verify against your application at any time, you will need to go through the Google security review.

:arrow-right: Learn more about Univerfied apps at Google.

External Application

Use external users if you are creating a production app and will need to go through Google security verification. This option will allow users who are not in your organization to authenticate against your application.

When users from your organization authorize against your application they will see the unverified application warning.

External apps are limited to 100 accounts before verification.

:arrow-right: Learn more about Univerfied apps at Google.

Create a Google App

  1. Go to https://console.developers.google.com/project
  2. Click Create Project.
  3. Give your project a name.
  4. Select your project Organization and Location if applicable.
  5. It can take several minutes for the project to be created. Once complete, you should see a green checkmark notification.

Enable Your APIs

  1. Click Enable APIs and Services or Library.
  1. Enable the following APIs. You can find the APIs using the search.
    1. Gmail API
    2. Google Calendar API
    3. Contacts API
    4. People API
    5. Admin SDK API - Enable this if you need access to room information for calendar events.

Configure Your OAuth Screen

You can configure your application's OAuth screen. This is the page users will see when they authenticate your application.

  1. From the Google APIs dashboard, click OAuth consent screen.

Choose your user type, either Internal or External.

Internal Oauth Screen

  1. Next, fill out the required OAuth consent information. For the Authorized domains use nylas.com.
  2. Save and Continue.
  3. Click Add or Remove Scopes. Select .../auth/userinfo.email, .../auth/userinfo.profile, and openid.
  4. Then review the Google Scopes and how they map Nylas. Then select the scopes needed for your application.
  5. Review the Summary and make sure the information is correct for your application.

External OAuth Screen

  1. Next, fill out the required OAuth consent information. For the Authorized domains use nylas.com.
  2. Save and Continue.
  3. Click Add or Remove Scopes. Select .../auth/userinfo.email, .../auth/userinfo.profile, and openid.
  4. Then review the Google Scopes and how they map Nylas. Then select the scopes needed for your application.
  5. At step 3, Test Users, you can skip this for now. We’ll go back and change the app to Production.
  6. Review the Summary and make sure the information is correct for your application.
  7. Click Back to Dashboard.
  8. Under the heading Publishing status, click Publish App. Publishing your app makes it so that you authorize users using the Nylas API instead of needing to add them one at a time to the Google test users. The app will show as unverified until you go through the Google Security Review.

Google Authentication Scopes

Review the scopes and choose the ones for your application.

🚧

Known Bug in Google Scopes

Due to a known bug with the Google API you shouldn't authenticate Google accounts with both email.read_only and email.metadata scopes. Doing so will cause Google to return 403 errors.

Google ScopeNylas Scopes
userinfo.emailRequired Google scopes
userinfo.profileRequired Google scopes
openidRequired Google scopes
gmail.composeemail.drafts, email.send
gmail.modifyemail.modify, email.send
gmail.labelsemail.folders_and_labels
gmail.metadataemail.metadata
gmail.sendemail.send
gmail.readonlyemail.read_only
calendarcalendar
calendar.readonlycalendar.read_only
contactscontacts
admin.directory.resource.calendar.readonlyroom_resources.read_only

Create Credentials

  1. Click Create Credentials or Credentials.
  2. Select OAuth client ID.
  3. Select Web Application as the Application Type.
  4. Give the application a name.
  5. Update Authorized redirect URIs:
    1. Hosted Authentication - https://api.nylas.com/oauth/callback
    2. Native Authentication - Use the callback URI for your application.
  6. Click Create.
  7. You’ll see your Client ID and Secret displayed in OAuth client created. Save this someplace safe. You’ll need these for your Nylas application.

Add Nylas To Your Application

Adding Nylas as an application owner will help our support team diagnose any issues that may arise.

  1. Click the menu, and select IAM & Admin > IAM.
  2. Click Add.
  3. Add [email protected] as an owner.
  4. Save.

Add Your Client ID and Secret to Nylas

  1. Log in to your Nylas Dashboard.
    1. If you don’t have an application, select Create New App.
  2. Select the App you want to update.
  3. Click App Settings.
  4. Select Google OAuth.
  5. Fill out your Google OAuth Client ID and Google OAuth Client Secret.

👍

Congratulations!

You’ve created a Google App and added it to your Nylas application!

Updated 2 months ago


Create a Google Application


Suggested Edits are limited on API Reference Pages

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