# Refresh token question

**URL:** <https://devforum.okta.com/t/refresh-token-question/3061>\
**Category:** Questions\
**Created:** [October 10, 2018, 3:49pm UTC](https://devforum.okta.com/t/refresh-token-question/3061 "2018-10-10T15:49:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeBarry](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@MikeBarry](https://devforum.okta.com/u/MikeBarry)\
**Post date:** [October 10, 2018, 3:49pm UTC](https://devforum.okta.com/t/refresh-token-question/3061/1 "2018-10-10T15:49:32Z")

</div>

I’m trying to get a refresh\_token back in the response from /authorize, so it can be used later to get a new access\_token from /token. However, my response from /authorize only contains id\_token and access\_token. access\_token expires after 20 minutes, and sometimes it is necessary for us to refresh this in a longer session. Any assistance would be appreciated.

I’ve added the following to the Okta widget config to include responseType : code and scope : offline\_access.

data.authParams = {  
issuer: OKTA\_ISSUER,  
responseType: [“id\_token”, “token”, “code”],  
scopes: [“openid”, “email”, “profile”, “offline\_access”]  
}

Reference -  
OpenID Connect & OAuth 2.0 API  
([https://developer.okta.com/docs/api/resources/oidc#openid-connect--oauth-20-api](https://developer.okta.com/docs/api/resources/oidc#openid-connect--oauth-20-api))

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![Govner](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/govner/32/1099_2.png) [@Govner](https://devforum.okta.com/u/Govner)\
**Post date:** [April 25, 2019, 11:13am UTC](https://devforum.okta.com/t/refresh-token-question/3061/2 "2019-04-25T11:13:44Z")

</div>

What happens if you instead ask from the three tokens from the /token endpoint after exchanging an authorization code from first endpoint?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 18, 2024, 12:51am UTC](https://devforum.okta.com/t/refresh-token-question/3061/3 "2024-01-18T00:51:58Z")

</div>

Closed on January 18, 2024, 12:51am UTC


