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

Creating a Google Project and Client ID for Internal Use

This workflow is intended for configuring Google account access for development or production applications that are internal-only. An "Internal"-type Google application that is created using this guide will only allow access to users from your organization (@your-organization.com). This type of application allows you to entirely skip the App Verification and Security Review processes required by Google for public-access applications, but limits which accounts can authenticate to your application.

If you have any trouble creating a Google Project and OAuth Client ID for internal use, get in touch with support@nylas.com and we'd be happy to help you out!

Create a Google Project

To get started, head over to https://console.developers.google.com/. You will be prompted to log in with a Google account if you're not already logged in with one. Make sure you log in with the Google account associated with the organization whose accounts you want to be able to connect to the application (e.g. you@your-organization.com to create an app that allows connections from @your-organization.com accounts).

Click on the project drop-down in the top left corner (usually labeled "Select a project"), and on the following screen click "NEW PROJECT":

Name your project and make sure the "Organization" drop-down has the correct Google Organization selected. Double-check this, as it can't be changed later!

Then select click "CREATE" in the bottom left corner:

It may take up to a minute or two to for Google to finish creating the project, after which you'll see a screen like this:

You've now created your Google Project! The next step is to enable the APIs needed to connect to Google via Nylas.

Enable APIs

Click the "ENABLE APIS AND SERVICES" button in the center of the screen

You'll be presented with the following search box:

Type "gmail" into the search box and click on the "Gmail API" card once it appears:

Click the large blue "ENABLE" button next to the Gmail logo

You'll find yourself on the following page. Click the search box in the center of the top bar:

Type "calendar" and click on "Google Calendar API" once it appears:

Click "ENABLE" for the Google Calendar API:

Do the same for the Contacts API ("contacts" is a good search term):

As well as the People API (search "people"):

You've now enabled all of the APIs that Nylas needs to sync data.

Create OAuth Client Credential

The last step to do in the Google Developer Console is to create a credential for OAuth. Click the "CREATE CREDENTIALS" button that you should see as below after enabling the People API:

On the next screen, you'll want to click the "client ID" word:

Then click "configure consent screen":

On the following page, fill out the "Application name" field and select "Internal" as the application type.

Scroll down, click "Add scope", select ../auth/calendar, ../auth/contacts, and ../auth/gmail.modify as the scopes for your consent screen, then click "ADD":

Finally, add [nylas.com](http://nylas.com) to the "Authorized domains" field. Your consent screen should look like this when you're done:

Scroll down to the bottom of the page and click the blue "Save" button!

Create an OAuth Credential

You should now find yourself on the following page.

Click "Create credentials" and select "OAuth client ID" from the drop-down menu.

You should see the following screen. Select "Web application" as your "Application type", name your credential, and fill in the value [https://api.nylas.com/oauth/callback](https://api.nylas.com/oauth/callback) for "Authorized redirect URLs":

Then click the blue "Create" button at the bottom of the screen.

You'll be presented with a page that shows your new OAuth Client ID and Secret.

Add Nylas as a Project Owner

The final step is to add Nylas as a Project Owner on your new project.

To do this, click the hamburger icon in the top left-hand corner of the screen and then click on the "IAM" submenu under "IAM & admin":

Once through to the IAM page, click the "ADD" button near the middle top.

Enter "support@nylas.com", select "Owner" as the Role, and click the blue "SAVE" button:

Notify Nylas

When you're finished setting up, please respond to the support ticket we asked you to complete this guide on so we can configure your Nylas application to use the new credentials.

Once support gets back to you, you'll be all set to start connecting Google accounts to your Internal application using Nylas! This Google Project can be used for both development and production usage.

Creating a Google Project and Client ID for Internal Use

Suggested Edits are limited on API Reference Pages

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