# From accessToken to get sessionToken

**URL:** <https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683>\
**Category:** OAuth/OIDC\
**Created:** [November 2, 2017, 1:29am UTC](https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683 "2017-11-02T01:29:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharilyn](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sharilyn](https://devforum.okta.com/u/sharilyn)\
**Post date:** [November 2, 2017, 1:29am UTC](https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683/1 "2017-11-02T01:29:50Z")

</div>

Hi,  
Is there a way that I can get sessionToken or sessionID from accessToken or idToken?  
I wants to extend user’s session when its going to expired.

Thanks.

---

<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, 7:54am UTC](https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683/2 "2019-04-25T07:54:49Z")

</div>

No the session cookie is managed seperately: [https://developer.okta.com/docs/api/resources/sessions/](https://developer.okta.com/docs/api/resources/sessions/) , [https://developer.okta.com/use\_cases/authentication/session\_cookie/](https://developer.okta.com/use_cases/authentication/session_cookie/)

Okta session cookie is session bound, it’s gone when:

–The browser processes are killed, which cleans up all session cookies, or

–User clicked Okta logout link, or

–Session expired (2 hours of inactivity is default, can be extended up to 90 days)

---

<div class="post-metadata">

**Author:** ![nu.sudhanva](https://avatars.discourse-cdn.com/v4/letter/n/d9b06d/32.png) [@nu.sudhanva](https://devforum.okta.com/u/nu.sudhanva)\
**Post date:** [July 7, 2020, 6:59pm UTC](https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683/3 "2020-07-07T18:59:57Z")

</div>

Hi @Govner ,

On the same topic, is there a way to create a new session (not extend an existing session) in OKTA using the access token, id token or refresh token?  
A similar use-case would be creating a new OKTA session by POSTING a SAML Response to OKTA acting as an SP and I know this works. In the above described case, I am trying to find out if a new OKTA session can be created in exchange for an access token, id token or refresh token.

Thanks

---

<div class="post-metadata">

**Author:** ![devpascoe](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/devpascoe/32/4640_2.png) [@devpascoe](https://devforum.okta.com/u/devpascoe)\
**Post date:** [March 29, 2023, 5:24am UTC](https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683/4 "2023-03-29T05:24:49Z")

</div>

Although its been a while since this post i’d love to know how you resolved this. I too would love a sessionToken to be generated from an accessToken, idToken or refreshToken.

---

<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:** [March 30, 2023, 5:25am UTC](https://devforum.okta.com/t/from-accesstoken-to-get-sessiontoken/683/5 "2023-03-30T05:25:40Z")

</div>

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