How to determine if an account is stopped

You can use a combination of multiple Nylas APIs and features to determine an account's sync state:


Method Delay Re-authentication criteria
Webhooks 10 minutes to 7 hours depending on scopes and provider Webhook trigger is account.stopped or account.invalid
API responses that are directly returned by the provider directly like for POST /send Instantaneous HTTP status code is 401 or 403
Application Accounts - Return an Account API 10 minutes to 7 hours depending on scopes and provider Returned sync state is invalid, invalid-credentials or stopped


In brief, we recommend to prompt the user to re-authenticate immediately when encountering the re-authentication criterion listed above, taking notes of the delay it can take for these to happen. 

Also, that accounts with limited/smaller scopes like only email.send or calendar can delay the time it takes to change an account sync state.




Why is the account stopped or invalid?

Webhook best practices


Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.