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"
}
Causes
- 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 provider is asking for a
- The token used for the API request does not have permission to the relevant scopes.
- The token is revoked or is expired.
Resolution
- Re-authenticate
- Make sure that the token has all the relevant scopes to do the API request.
- Make sure the token is valid Check token info
Resources:
How to handle accounts going into stopped or invalid state.
Updated
Comments
0 comments
Please sign in to leave a comment.