# Modifying the access token duration from Auth0 rules/hooks

**URL:** <https://community.auth0.com/t/modifying-the-access-token-duration-from-auth0-rules-hooks/39787>\
**Category:** Get Help\
**Tags:** rules, expiration, hooks\
**Created:** [March 23, 2020, 7:52am UTC](https://community.auth0.com/t/modifying-the-access-token-duration-from-auth0-rules-hooks/39787 "2020-03-23T07:52:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/selva/32/12977_2.png) [@Selva](https://community.auth0.com/u/Selva)\
**Post date:** [March 23, 2020, 7:52am UTC](https://community.auth0.com/t/modifying-the-access-token-duration-from-auth0-rules-hooks/39787/1 "2020-03-23T07:52:11Z")

</div>

Hi  
Greetings!  
Is it possible to customize the access token expiry duration per application/per connection?  
It is currently configurable at the API level in Auth0. My requirement is to provide different access token expiry duration for different applications that access the same API. Is it possible to configure the access token lifetime from the script?

Related posts:

> [@Per-connection setting for API token lifetime](http://community.auth0.com/t/per-connection-setting-for-api-token-lifetime/6229):
>
> Hi Team, I’ve asked about that before (1)][1](https://auth0.com/forum/t/set-token-expiration-per-connection-type/5380), and there was a similar question recently (2)][2](http://community.auth0.com/questions/856/setting-jwtconfigurationlifetimeinseconds-in-rule), but just to re-iterate: is it possible to set token expiration time for each connection for the tokens that target an API? Currently, I can set token lifetime per-API separately for non-interactive clients (via token\_lifetime) and web flow clients (via token\_lifetime\_for\_web, which btw is not documented in (3)][3](https://auth0.com/docs/api/management/v2#!/Resource_Servers/patch_resource_servers_by_id)). However, I would like to have further configurability for my web clients on a per-conne…

[http://community.auth0.com/t/allow-to-modify-access-token-expiration-from-rules-and-hooks-in-oidc-flows/6507](http://community.auth0.com/t/allow-to-modify-access-token-expiration-from-rules-and-hooks-in-oidc-flows/6507)  
But I do not see any solution at the server side in them. Is it supported of late?

Thanks  
Selva

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 23, 2020, 8:04am UTC](https://community.auth0.com/t/modifying-the-access-token-duration-from-auth0-rules-hooks/39787/2 "2020-03-23T08:04:23Z")

</div>

Hi @Selva,

> Is it possible to customize the access token expiry duration per application/per connection?

No, not supported.

---

<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:** [April 7, 2020, 8:04am UTC](https://community.auth0.com/t/modifying-the-access-token-duration-from-auth0-rules-hooks/39787/3 "2020-04-07T08:04:26Z")

</div>

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