# The grant was issued for another authorization server & how long do refresh tokens last?

**URL:** <https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736>\
**Category:** Questions\
**Created:** [April 5, 2019, 7:12am UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736 "2019-04-05T07:12:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkwyche](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@mkwyche](https://devforum.okta.com/u/mkwyche)\
**Post date:** [April 5, 2019, 7:12am UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736/1 "2019-04-05T07:12:16Z")

</div>

Hi,

I’m trying to implement the Authorization Flow via Python([https://developer.okta.com/authentication-guide/implementing-authentication/auth-code/#\_1-setting-up-your-application](https://developer.okta.com/authentication-guide/implementing-authentication/auth-code/#_1-setting-up-your-application))

I believe I’m almost at the finish line. I’m running into an issue when trying to use the Authorization Code I’m getting this error:

```auto
{"error":"invalid_request","error_description":"The grant was issued for another authorization server."}

```

Can anyone let me know how to trouble shoot this?

---

<div class="post-metadata">

**Author:** ![mkwyche](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@mkwyche](https://devforum.okta.com/u/mkwyche)\
**Post date:** [April 5, 2019, 7:36am UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736/2 "2019-04-05T07:36:49Z")

</div>

In case anyone else runs into this. This will occur if you didn’t use `default` in your authorize URL but did in your `token` url

---

<div class="post-metadata">

**Author:** ![mkwyche](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@mkwyche](https://devforum.okta.com/u/mkwyche)\
**Post date:** [April 5, 2019, 7:59am UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736/3 "2019-04-05T07:59:21Z")

</div>

Now that I’m passed that. In the instructions for using [refresh tokens](https://developer.okta.com/authentication-guide/tokens/refreshing-tokens/#how-to-use-a-refresh-token)

It mentions getting a new `Access Refresh Token Pair` do I need to update my refresh token each time I get a new access token?

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [April 5, 2019, 10:35am UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736/4 "2019-04-05T10:35:31Z")

</div>

Hi @mkwyche

No, you don’t need to update your refresh token. It will keep the same value and lifetime that is set under the policy of the authorization server (Admin \>\> (Security) \>\> API \>\> Authorization Servers \>\> default \>\> Access Policies \>\> policy \>\> policy rule).

If the refresh token expires, then you would need to do a request to Okta to get a new one.

---

<div class="post-metadata">

**Author:** ![mkwyche](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@mkwyche](https://devforum.okta.com/u/mkwyche)\
**Post date:** [April 5, 2019, 11:04am UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736/5 "2019-04-05T11:04:32Z")

</div>

@dragos Thanks for the reply.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 17, 2024, 11:19pm UTC](https://devforum.okta.com/t/the-grant-was-issued-for-another-authorization-server-how-long-do-refresh-tokens-last/4736/6 "2024-01-17T23:19:50Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
