# How can I figure out the frequency that my personal access token will expire?

**URL:** <https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216>\
**Category:** API & Developers\
**Tags:** access-token, authentication\
**Created:** [4 February 2022 16:41 UTC](https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216 "2022-02-04T16:41:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zane\_Stickel](https://luna1.co/8d76cd.png) [@Zane\_Stickel](https://forum.asana.com/u/Zane_Stickel)\
**Post date:** [4 February 2022 16:41 UTC](https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216/1 "2022-02-04T16:41:11Z")

</div>

I received the following error which broke my one off application:  
“errors”: [  
{  
“message”: “Personal access token has expired. Your token can be reset in the Developer App Console: [Log in - Asana](https://app.asana.com/0/developer-console.)”,  
“help”: “For more information on API status codes and how to handle them, read the docs on errors: [Build an app with Asana](https://asana.com/developers/documentation/getting-started/errors)”  
}  
]  
How can I automate rotation of my personal access token? If that is not possible, can I at least receive notification that my token is about to expire? My application runs on a schedule so I only discover the error on failure.

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [4 February 2022 21:30 UTC](https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216/2 "2022-02-04T21:30:25Z")

</div>

Tokens lasts for around 1 hour. You should detect the expired token response, and code something to refresh it and retry our previous call.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [5 February 2022 17:47 UTC](https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216/3 "2022-02-05T17:47:13Z")

</div>

> [@Frederic\_Malenfant](#):
>
> Tokens lasts for around 1 hour.

That’s true for OAuth tokens but not for PATs, @Frederic_Malenfant, right? I didn’t think they expired at all. Apparently they do but it must be a long time, maybe a year or more?

@Andrew-asana can you say how long a PAT is good for?

---

<div class="post-metadata">

**Author:** ![Frederic\_Malenfant](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/frederic_malenfant/32/8358_2.png) [@Frederic\_Malenfant](https://forum.asana.com/u/Frederic_Malenfant)\
**Post date:** [5 February 2022 18:53 UTC](https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216/4 "2022-02-05T18:53:02Z")

</div>

Oh I didn’t know they exists ! We always use oauth in our app! I don’t find any documentation about the duration of the PAT.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:02 UTC](https://forum.asana.com/t/how-can-i-figure-out-the-frequency-that-my-personal-access-token-will-expire/152216/5 "2025-05-30T19:02:31Z")

</div>


