Unable to set non-default token expiry for Auth0 access_token

We want to set access_token expiry with different value for each Auth0 client/application. We are passing audience parameter in /oauth/token API to create token. A default value of access_token expiry is getting set for all applications. The default value seems to be coming from the Token-Expiration value defined in our API settings page under Auth0 Applications->API page.
We don’t want the same default access_token expiry for all applications but want different value for each application(client). How can we do this?

Hi there @gangas welcome to the community!

You’re correct here in that the at lifetime comes from the API settings in your Auth0 dashboard - One workaround may be to create separate APIs and therefore audiences per application in your dashboard. Although a bit more overhead, in the end they relate to the same resource server/API.

1 Like

Thanks for the confirmation and for suggesting a possible workaround.

1 Like

No problem, happy to help! :rocket:

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