# Token\_failed, Failed to get token: \[error: invalid\_grant, description: Unknown or invalid refresh toke

**URL:** <https://community.auth0.com/t/token-failed-failed-to-get-token-error-invalid-grant-description-unknown-or-invalid-refresh-toke/82564>\
**Category:** Get Help\
**Tags:** refresh-tokens, auth0\
**Created:** [April 28, 2022, 3:00pm UTC](https://community.auth0.com/t/token-failed-failed-to-get-token-error-invalid-grant-description-unknown-or-invalid-refresh-toke/82564 "2022-04-28T15:00:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [April 28, 2022, 10:51pm UTC](https://community.auth0.com/t/token-failed-failed-to-get-token-error-invalid-grant-description-unknown-or-invalid-refresh-toke/82564/3 "2022-04-28T22:51:03Z")

</div>

Hi there @ahmed.khouaja welcome to the community!

> [@ahmed.khouaja](#):
>
> didn’t understand why it can’t do tokenrequest and return an error

I think you’re always going to get an error thrown at that point if there is one.

As to why the error is occurring, I’ve seen this happen in a couple of scenarios. One possibility is if you are rotating refresh tokens, and trying to reuse them. Another being that if a refresh token is revoked, grants are also deleted and thus all subsequent tokens with the same user, client\_id, and audience are invalid. Some more on that here:

> [@Invalid Refresh Token](https://community.auth0.com/t/invalid-refresh-token/10335/2):
>
> An invalid refresh token can occur if: [The token was revoked](https://auth0.com/docs/api/authentication#refresh-token)[The grants to the client application were deleted](https://auth0.com/docs/api/management/v2#!/Grants/delete_grants_by_id) One important detail is that when you revoke a token, for security reasons the grants associated with that token are deleted. This means that all other refresh tokens issued to the same combination of application, user and audience effectively become invalid. If you are revoking refresh tokens as part of your flow, this might explain it.

Hope this helps!

---

_[View the full topic](https://community.auth0.com/t/token-failed-failed-to-get-token-error-invalid-grant-description-unknown-or-invalid-refresh-toke/82564)._
