This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
** Inspired by: https://stackoverflow.com/a/52436395/1756953 | |
** Modified from: https://gist.github.com/harryi3t/dd5c61451206047db70710ff6174c3c1 | |
** | |
** Postman as of Nov 2018 does not support auto-refreshing of Oauth-2 tokens. | |
** This is an exmaple on how in one can refresh their Oauth-2 tokens just using the pre-request scripts. | |
** Pre-requisites: You need to have a refresh token. You can use the Postman app to get one. | |
** | |
** Step 1: Create a Postman environment and set the following variables: | |
** tokenUrl |