# Get idle token lifetime from token

**URL:** <https://community.auth0.com/t/get-idle-token-lifetime-from-token/79313>\
**Category:** Get Help\
**Created:** [March 4, 2022, 9:18pm UTC](https://community.auth0.com/t/get-idle-token-lifetime-from-token/79313 "2022-03-04T21:18:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GFlores](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gflores/32/35647_2.png) [@GFlores](https://community.auth0.com/u/GFlores)\
**Post date:** [March 4, 2022, 9:18pm UTC](https://community.auth0.com/t/get-idle-token-lifetime-from-token/79313/1 "2022-03-04T21:18:49Z")

</div>

Please include the following information in your post:

- \*\*Which SDK this is regarding: auth0-angular
- \*\*SDK Version:1.8.2
- \*\*Platform Version: Angular 12

I need to get the idle token lifetime so I can Inform the user there is x amounts of minutes left for the user to perform an action otherwise it will be logged out

---

<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:** [March 7, 2022, 10:26pm UTC](https://community.auth0.com/t/get-idle-token-lifetime-from-token/79313/3 "2022-03-07T22:26:37Z")

</div>

Hi there @GFlores and welcome to the community!

Depending on your use case, both ID and Access tokens have an `exp` claim which is a Unix timestamp for when each respective token will expire. You could do some math with this time vs the current time. Alternatively, if you are requesting both an ID and Access token (openid scope) there will be an `expires_in` value included in the response alongside the tokens. This value refers to the lifetime of the **Access token** specifically and is in seconds.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 22, 2022, 10:26pm UTC](https://community.auth0.com/t/get-idle-token-lifetime-from-token/79313/4 "2022-03-22T22:26:40Z")

</div>

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