# M2M token without expiry date

**URL:** <https://community.auth0.com/t/m2m-token-without-expiry-date/103777>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [March 30, 2023, 7:16pm UTC](https://community.auth0.com/t/m2m-token-without-expiry-date/103777 "2023-03-30T19:16:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukesamkharadze](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lukesamkharadze/32/45250_2.png) [@lukesamkharadze](https://community.auth0.com/u/lukesamkharadze)\
**Post date:** [March 30, 2023, 7:16pm UTC](https://community.auth0.com/t/m2m-token-without-expiry-date/103777/1 "2023-03-30T19:16:47Z")

</div>

I’ve backend application that accesses the auth0 api to get user social information, but the access token expires and needs to be refreshed in a while. I’ve tried to increase token expiration to infinite seconds, but max amount was 30days.

Is there any way to get m2m access token that won’t expire? I dont want to add refresh logic as it will add more code to be maintenanced, I just want simple solution.

---

<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 31, 2023, 12:48am UTC](https://community.auth0.com/t/m2m-token-without-expiry-date/103777/3 "2023-03-31T00:48:42Z")

</div>

Hey @lukesamkharadze!

> [@lukesamkharadze](#):
>
> Is there any way to get m2m access token that won’t expire? I dont want to add refresh logic as it will add more code to be maintenanced, I just want simple solution.

There unfortunately isn’t a way around this - You’ll need to implement some sort of logic on your end that simply requests a new Management API access token when needed using client credentials.

---

<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 14, 2023, 12:48am UTC](https://community.auth0.com/t/m2m-token-without-expiry-date/103777/4 "2023-04-14T00:48:46Z")

</div>

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