My question: How do I programmatically specify the token used in the Authorization tab of an API call?
Details (like screenshots): I have multiple tokens saved in Postman for multiple different “users”. These are visible under “Manage Tokens”, and they each have different names. Each contains various unique attributes that you would expect for OAuth2.0 validation, such as the access token, refresh token, expiry date etc.
I would like to run the same collection multiple times, once for each different “user” (a.k.a. unique token that I have stored). I am not sure how to change the token being used, other than by clicking the drop-down menu under the Authorization tab.
How I found the problem: I understand this can be done by manually specifying headers as variables, but I like how Postman automatically handles refreshing the access token if you use the Authorization tab.
I’ve already tried: pm.environment.set(“currentAccessToken”) = myTokenName in pre-test script