# Access token expiry

**URL:** <https://community.auth0.com/t/access-token-expiry/128612>\
**Category:** Get Help\
**Tags:** auth0-management-api-webhooks, extensions\
**Created:** [February 29, 2024, 3:04pm UTC](https://community.auth0.com/t/access-token-expiry/128612 "2024-02-29T15:04:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sellochrismodise](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sellochrismodise/32/51025_2.png) [@sellochrismodise](https://community.auth0.com/u/sellochrismodise)\
**Post date:** [February 29, 2024, 3:04pm UTC](https://community.auth0.com/t/access-token-expiry/128612/1 "2024-02-29T15:04:52Z")

</div>

The access token expiry is still long even after changing the time to 600 sec on the portal.  
“exp”: 1709215939.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 29, 2024, 6:45pm UTC](https://community.auth0.com/t/access-token-expiry/128612/3 "2024-02-29T18:45:50Z")

</div>

Hi @sellochrismodise,

The expiration time you shared is in GMT date and time.

To verify that your access token expiration is set for 600 seconds, you can perform the following calculation:

- Token expiration (in seconds) = `exp` (Expiration time in seconds) - `iat` (Issued at in seconds)

The token expiration time should match the value you set in your token settings.

(Reference: [Change expiration Time of access token - #3 by rueben.tiow](https://community.auth0.com/t/change-expiration-time-of-access-token/125726/3))

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![sellochrismodise](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sellochrismodise/32/51025_2.png) [@sellochrismodise](https://community.auth0.com/u/sellochrismodise)\
**Post date:** [March 5, 2024, 10:55am UTC](https://community.auth0.com/t/access-token-expiry/128612/4 "2024-03-05T10:55:02Z")

</div>

Hi Rueben thanks for the response I managed to find the expiration time and set it correctly thanks. However my issue is that I am using the auth0 httpintercepter and for some reason it keeps creating new tokens on every api request. I want to be able to redirect to login after token expiration.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 6, 2024, 4:26pm UTC](https://community.auth0.com/t/access-token-expiry/128612/5 "2024-03-06T16:26:39Z")

</div>

Hi @sellochrismodise,

The `AuthHttpInterceptor` is used to attach access tokens to outgoing requests.

Therefore, you must select which requests to attach the access token to in the SDK config.

For an example, I suggest referring to our [Auth0 Angular - Call an API example](https://github.com/auth0/auth0-angular/blob/main/EXAMPLES.md#call-an-api).

Cheers,  
Rueben

---

<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 20, 2024, 4:27pm UTC](https://community.auth0.com/t/access-token-expiry/128612/6 "2024-03-20T16:27:11Z")

</div>

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