Only show these results:

400-499 Response

400 responses return for errors on the client side.

400 - Bad Request

The browser (or proxy) sent a request that this server could not understand.

Cause
Your request was malformed or contained an invalid parameter. The most common issue is invalid JSON.

Solution
Ensure your API payload is in valid JSON format, making sure quotes are properly escaped in your code.

400 - Authentication Failed

Gmail

Invalid or revoked refresh token.

Cause
The provided Google refresh token is missing scopes that Nylas requires:

  • userinfo.email
  • userinfo.profile
  • openid

Solution
Generate a new Google refresh token with the required scopes above.

400

Microsoft

This proposal does not allow direct password entry. Please restart the authentication flow.

Cause

  • The customer is trying to authenticate an account with basic authentication, which requires the OAuth flow.
  • The customer app is not set up for the OAuth flow. There's no Azure app configured for their application.

Solution

  • Create an Azure app for Microsoft integrations.
  • Pass force_password=true into the hosted authentication payload and select Exchange. See Hosted authentication.
  • Enter a random email address into the email address field during the authentication process, then select Exchange.

401 - Unauthorized

Could not verify access credentials.

Cause

Solution
To properly encode your client secret, you need to do the following on the command line: $ echo -n "<CLIENT_SECRET>:" | base64.

402 - Sending to at least one recipient failed

Cause
If any of the recipient addresses contain non-ASCII characters (such as characters with accents or other diacritics), these recipients will be among those to whom delivery failed.

Solution
Nylas is not currently able to send messages to such email addresses.

403 - Unauthorized

Cause
The server was unable to authenticate with the user's mail provider.

Solution
Re-authenticate the user and try again.

403 - Gmail API has not been used in project

Gmail

Cause
The Gmail API is disabled.

Solution

  • Check if Gmail API is enable in your Google project.

403 - Different email address returned

Microsoft

Cause
Office 365 returned us an email address different from the one that started the authentication process.

Solution

  • When using OAuth, the email address used to authenticate must remain the same throughout the process.
  • Ensure the user is not entering or selecting a different email address on Office 365 than originally entered on Nylas.
  • Make sure the user is not attempting to log into an alias. They must authenticate with the main account.
  • If the issue persists, ask the user to log out of all Office 365 accounts and then try again. Alternatively, ask the user to try authenticating from an incognito or private browser session.

422 - Mail Provider Error

Cause
An error occured while the mail provider was sending the message.

Solution
See the server_error value in the response body JSON for more information.

422 - Sending Error

Message delivery submission failed.

Cause
Sending with a different email address than the one that was synced. For example, the account was synced with [email protected], but the email is sent from [email protected]. See Sending failures for more.

Solution

  • Check the sending name. Make sure the sending email is the same as the synced account.
  • Retry the send with exponential backoff.
  • Confirm that the Exchange server has not quarantined the syncing devices used to sync.

429 - Account Throttled

Cause
The account is in a throttled state and the mail server has asked us to temporarily stop making requests.

Solution
Wait and try again later.

429 - Quota Exceeded

Cause
The user has exceeded their mail provider's sending quota.

Solution
Unfortunately, there is no reliable way to determine these limits. Wait and try again later.

429 - Nylas API Rate Limit

Cause
You've made too many requests to the Nylas API too quickly.

Solution
Wait and try again later. See Rate limiting.

429 - Too Many Requests

Gmail

The Gmail account has exceeded the usage limit.

Cause

  • The daily limit was exceeded on Google project.
  • The user rate limit was exceeded on Google project.
  • The project rate limit was exceeded.

Solution

  • Retry failed requests.
  • Check the Quotas from Google Project and request additional quota.
  • Take a look at some related documentation:

429

Microsoft

The Exchange account has been throttled or sync has been temporarily paused.

Cause

  • Reached Nylas API limits.
  • The account has reached its sending limit with the email provider.
  • The user has not reached the Nylas API limits, but the Exchange server has throttled the account to decrease the load on the server. Exchange servers will do this independent of sending. Nylas has received a 503 error along with the message The server encountered an unknown error, the device SHOULD retry later.<85>.. Sending emails during this time will return a 429 error.

Solution

  • Retry sending with exponential backoff.
  • Check the Exchange server settings. Talk to your administrator about raising the throttling limits.
  • Check the Exchange server settings. Talk to your administrator about raising the throttling limits.
  • The Exchange server will send Nylas a header with information indicating how long to wait before syncing again. While Nylas is waiting to send, you will receive a 429. Typically this takes 20 minutes.
  • Take a look at some related documentation: