# Manually expire access\_token for testing

**URL:** <https://www.patreondevelopers.com/t/manually-expire-access-token-for-testing/4211>\
**Category:** Uncategorized\
**Created:** [February 13, 2021, 11:51pm UTC](https://www.patreondevelopers.com/t/manually-expire-access-token-for-testing/4211 "2021-02-13T23:51:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JavascriptMick](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/javascriptmick/32/1593_2.png) [@JavascriptMick](https://www.patreondevelopers.com/u/JavascriptMick)\
**Post date:** [February 13, 2021, 11:51pm UTC](https://www.patreondevelopers.com/t/manually-expire-access-token-for-testing/4211/1 "2021-02-13T23:51:55Z")

</div>

I have written code (node/passport) to support refreshing of my users access\_token via the refresh\_token after it’s expiry. Expiry is 1 month by default. I can’t wait 1 month to test the code 🙂

Is there a way to either manually expire the access\_token or maybe request a shorter expiration token just for testing?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [February 17, 2021, 5:21pm UTC](https://www.patreondevelopers.com/t/manually-expire-access-token-for-testing/4211/2 "2021-02-17T17:21:52Z")

</div>

Best is to refresh tokens before they expire, likely 2-3 days before.

Also, you can just go ahead and try to refresh a token that is not expired.
