The invalid_grant error is caused by the authorisation grant or refresh token being invalid, expired, revoked, or not matching the redirection URI used in the authorisation request, or being issued to another client.
Solution
- Confirm that you do not have multiple developers testing using the same account, this will lead to multiple tokens being created which will constantly invalidate each other.
- Check if you have passed the refresh token window (which is 30 days). Once the user gives consent, as we know, the access token lasts for 5 minutes, which you can refresh using the refresh token. This token then lasts for 30 days.
Hence, even if the total consent period may be valid for 90 days, it must be refreshed within a 30-day window using to guarantee total lifetime.
5. If the invalid_grant
error takes place during a code exchange (authorization_code
) after authentication, make sure the code is no older than 5 minutes.
More
Have a look at our comprehensive list of the authentication errors in our
.
Comments
0 comments
Please sign in to leave a comment.