Why do I receive a 401 error when making an API call?

When some or all API calls start returning 401, this means that the Nylas token or provider credentials or both are invalid. 

If only /send, /file upload and some other POST calls are returning 401 it is the provider's credentials that are invalid. In both cases, the user needs to re-auth.


Error Response:

"message": "Could not verify access credential.",
"type": "invalid_request_error"



  • Invalid credentials
    • The provider is asking for a multi-factor authentication to renew the token.
    • You can also check the Dashboard sync logs to find any errors in renewing access tokens.
  • The token used for the API request does not have permission to the relevant scopes.
  • The token is revoked or is expired.





How to handle accounts going into stopped or invalid state.




Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.