Only show these results:
public-beta-v3

Event Codes in Nylas API v3

The Nylas API v3 is in public beta. It might contain bugs, and might change before it is generally available. See the v3 Beta documentation for more information.

This page is a reference list for error and event codes that you might encounter when working with API v3.

Categories

  • HTTP: General-purpose HTTP response errors.
  • Token: Events related to JWT tokens.
  • Grant: Issues with a Grant during creation (hosted, native) or maintenance.
  • Account: Issues with an account cancellation or reactivation.
  • Calendar: Issues with a Calendar during creation or deletion.
  • Connector: Events with Connector (previously called Integration).
  • Provider: Problems that are reported from the provider's side and are out of UAS control.
  • Application: Issues that can happen during Application creation, deletion, or fetching (such as missing parameters).
  • Common: Common events and problems that are not specific to any category.

HTTP error response sample

{
"request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
"error": {
"type": "api.bad_request",
"message": "Bad request",
"provider_error": "Google cannot accept this kind of request for Google's OAuth2.0 flow"
}
}

Event codes

Type HTTP Code Default message Category
api.bad_request 400 Bad request HTTP
api.invalid_request_error 401 Authentication error HTTP
api.unauthorized_access 403 Unauthorized access HTTP
api.not_found_error 404 Resource not found HTTP
api.internal_error 500 Internal error, contact administrator. HTTP
api.invalid_request_payload 400 Invalid JSON payload format. HTTP
api.invalid_query_params 400 Invalid query parameters provided. HTTP
api.invalid_field 400 Invalid field HTTP
token.exchange_failed 400 OAuth 2.0 token exchange failed. Token
token.exchange_success 200 OAuth 2.0 token exchange success. Token
token.revoke_all_nylas_tokens 200 All Nylas tokens are revoked. Token
token.revoke_all_nylas_tokens_except_one 200 All Nylas tokens are revoked except one. Token
token.generate_new_token_dashboard 201 Generate a new Nylas token through Dashboard. Token
token.revoke_sync 200 Nylas token revoked Token
token.revoke_oauth 200 Revoke a Nylas token from OAuth endpoint. Token
grant.id_token_invalid 404 Authentication error Token
grant.callback_uri_not_allowed 400 callback_uri is not allowed for this connector. Grant
grant.login_id_invalid 400 Login ID or request is invalid or has expired. Grant
grant.no_login_scopes 400 Connector's default scopes and login request scopes are both empty. Grant
grant.not_found 404 Grant not found Grant
grant.refresh_token_invalid 401 Invalid refresh_token supplied to Grant. Grant
grant.expired N/A Grant refresh/access token has expired. Please re-authenticate. Marked as invalid Grant. Grant
grant.provider_required 400 Provider field is required. Grant
grant.refresh_token_required 400 refresh_token field is required. Grant
grant.created 201 Grant created Grant
grant.deleted 200 Grant deleted Grant
grant.updated 200 Grant updated Grant
grant.reauth_email_invalid 400 Email addresses did not match during re-authentication. Grant
grant.scopes_conflict 400 Some requested scopes were not included in the completed hosted auth, resulting in denied authentication. Grant
grant.gmail_domain_invalid 400 Gmail domain is not allowed, resulting in denied authentication. Grant
grant.access_denied 403 Access to Grant denied Grant
grant.historic_sync_completed N/A Historic sync completed Grant
grant.account_not_found 404 Account not found Grant
grant.invalid_authentication 400 Authentication failed due to wrong input or credentials. Grant
grant.provider_not_responding 400 Provider not responding Grant
grant.auth_limit_reached 400 Maximum number of retries reached for hosted auth. Grant
grant.imap_type_mismatch 400 IMAP provider mismatch Grant
grant.provider_mismatch 400 Grant provider mismatch Grant
grant.reauthenticated 200 Grant re-authenticated Grant
grant.imap_autodetect_fail 400 IMAP auto-detection failed. Please provide additional IMAP configuration (host, port). Grant
grant.hosted_login_started 200 Hosted login started. Occurs when user visits /connect/login?id=.... Grant
grant.hosted_login_used 200 Hosted login used. Happens when user gets redirected to Nylas' /connect/callback. Grant
grant.hosted_login_expired 400 Hosted login expired Grant
grant.session_revoke_failed 400 Session revoke failed Grant
grant.session_revoke_success N/A Session revoke success Grant
grant.profile_scopes_missing N/A Minimum profile scopes are missing. Grant
grant.provider_id_token_missing 400 Provider did not return ID token for authorized account. Grant
grant.hosted_cookie_nonce_invalid N/A Browser cookie-nonce does not match. Grant
account.delete_developer 200 Account is deleted through developer endpoint. Account
account.cancel 200 Account is canceled Account
account.reactivate 200 Account is reactivated Account
account.delete_dashboard 200 Account is deleted through Dashboard. Account
calendar.created 201 Calendar is created Account
calendar.updated 200 Calendar is updated Calendar
calendar.deleted 200 Calendar is deleted Calendar
calendar.event_upsert 200 Calendar Event is created or updated. Calendar
calendar.event_deleted 200 Calendar Event is deleted. Calendar
connector.created 201 Connector created Connector
connector.deleted 200 Connector deleted Connector
connector.updated 200 Connector updated Connector
connector.not_found 404 Connector not found Connector
connector.provider_not_supported 400 Provider invalid or not supported. Connector
connector.provider_settings_invalid 400 Provider settings not supported. Connector
connector.provider_settings_secret_required 400 Provider settings and Secret both are required if one needs to change. Connector
connector.already_exists 400 Connector already exists Connector
connector.problem 400 Issues found with connector's settings or configuration. Connector
credential.not_found 404 Credential not found Connector
credential.already_exists 400 Credential with this name for given connector already exists. Connector
credential.missing_param 400 Credential is missing some essential values in its settings. Connector
credential.created 201 Credential created Connector
credential.updated 200 Credential updated Connector
credential.deleted 200 Credential deleted Connector
connector.no_longer_exists 400 Connector no longer exists. Connector
oauth2.provider_code_request_failed 400 Provider refused to return refresh_token using code. Provider
oauth2.oauth_failed 400 Hosted OAuth failed due to rejection by provider or user refusing consent. Provider
oauth2.invalid_client 400 OAuth client not found. Provider
oauth2.invalid_grant 400 Error creating grant with provided OAuth parameters. Provider
oauth2.invalid_request 400 Request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed. Provider
oauth2.redirect_uri_mismatch 400 Redirect URI not allowed. Provider
oauth2.unsupported_grant_type 400 Invalid grant_type Provider
oauth2.invalid_token 401 Token expired or revoked. Provider
oauth2.oauth_redirect N/A Redirecting to OAuth 2.0 protocol. Provider
oauth2.oauth_provider_error 400 Error from OAuth 2.0 provider. Provider
oauth2.origin_not_allowed 400 Error origin not allowed for callback_uri for platform:js. Provider
application.missing_required_parameter 400 One of the platform's required parameters is missing. Application
application.not_found 404 Application not found Application
application.callback_uris_not_found 404 Application's redirect URIs not found. Application
application.callback_uri_is_not_valid 400 Application's redirect URI is not valid. Application
application.created 201 Application is created Application
application.deleted 200 Application is deleted Application
application.updated 200 Application is updated Application
application.id_not_allowed 403 Application ID not allowed. Application
common.scope_not_allowed 400 One or more provided scopes is not allowed. Common
common.secret_not_found 404 Searched Secret record not found. Common
common.cache_record_not_found 404 Searched cache record not found. Common