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
/* | |
Install this script as a pre-request Script on your Postman collection. | |
Define Auth_Url, and Basic_Auth as local variables on the collection. | |
Define OAuth_Token, OAuth_Timestamp, ExpiresInTime, OAUTH_USERNAME, OAUTH_PASSWORD and OAUTH_REFRESH_TOKEN | |
in the associated Postman environment. | |
*/ | |
var tokenDate = new Date(2010, 1, 1); | |
var tokenTimestamp = pm.environment.get("OAuth_Timestamp"); | |
if (tokenTimestamp) { | |
tokenDate = Date.parse(tokenTimestamp); |