# How to automatize OAuth2 token RE-negotiation WHENEVER refresh token is expired

**URL:** <https://community.postman.com/t/how-to-automatize-oauth2-token-re-negotiation-whenever-refresh-token-is-expired/45399>\
**Category:** Help Hub\
**Created:** [March 21, 2023, 9:25am UTC](https://community.postman.com/t/how-to-automatize-oauth2-token-re-negotiation-whenever-refresh-token-is-expired/45399 "2023-03-21T09:25:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benoit.lefevre](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@benoit.lefevre](https://community.postman.com/u/benoit.lefevre)\
**Post date:** [March 21, 2023, 9:25am UTC](https://community.postman.com/t/how-to-automatize-oauth2-token-re-negotiation-whenever-refresh-token-is-expired/45399/1 "2023-03-21T09:25:17Z")

</div>

> Many blog articles or answers found here explain how to configure Postman to :
> 
> - programmatically get OAuth 2 tokens thanks (collection’s) Pre Request Scripts
> - manually get an OAuth 2 token thanks the Authorization tab’s **“Get New Access Token”** button
> - automatically have a token refreshed, thanks the refresh token coming along with the token fetched while using the **“Get New Access Token”**
> 
> But while using the Postman request’s Authorisation tab feature, what happens whenever the refresh token itself is expired ?

**_My question_:**

Whenever I activate the **Auto-refresh token** option, from one request or collection’s Authorization tab, and the refresh token itself is exhausted, I’d like Postman to automatically trigger the **“Get New Access Token”** process.

Is it possible to configure it in such a way, or to “add” programmatically this feature ?

**_I’ve already tried_:**

Using the auto refresh token option, but our refresh token themself expires pretty fast, and whenever it occurs, I need to once again to clicking on the **Get New Access Token** button. I’d rather to have Postman doing it automatically for me 🙂
