Nylas v2: Account stopped due to multiple similar server errors
Sometimes, Nylas automatically stops end users' accounts if they receive the same error from an email server too many times. You might see an error from Nylas when you make a modifying HTTP request, similar to the one below.
{
"message": "This action can't be performed because the account's sync has been stopped. Please contact support@nylas.com to resume sync.",
"type": "invalid_request_error"
}
This may happen for one of two reasons:
- The account encountered a temporary issue.
- The account's credentials were invalidated (for example, the end user changed their password).
Temporary issue
In this case, Nylas stopped the account because of a temporary issue. You can restart the account by canceling it, then reactivating it.
curl --request POST \
--url https://api.nylas.com/a/<NYLAS_CLIENT_ID>/accounts/<NYLAS_ACCOUNT_ID>/downgrade \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
-u "<NYLAS_CLIENT_SECRET>:"
curl --request POST \
--url https://api.nylas.com/a/<NYLAS_CLIENT_ID>/accounts/<NYLAS_ACCOUNT_ID>/upgrade \
--header 'Accept: application/json' \
-u "<NYLAS_CLIENT_SECRET>:" \
--header 'Content-Type: application/json'
See the Cancel Account and Reactivate Account reference documentation for more information.
Nylas queues the account to sync, and you can make requests for the account within one minute.
Invalid credentials
In this case, Nylas stopped the account because its credentials were invalidated on the server, or the end user changed their password. The end user must re-authenticate their account.
Resources
For more information about account sync states and troubleshooting them, see the following documentation: