Hello,
My question is, is there a way to reach the environment variable initial value for a monitor call, possibly without using up any more API calls inside each request? Or is there a better way for me to solve my issue, like using a text file?
Some background:
I monitor a collection and all the requests inside use the same OAuth 2.0 token. Right now each call runs the same pre-request script to generate a token and then sends the request which “eats up” 2 monitor calls on 1 request - it works but uses precious calls unnecessarily.
To save them up, I want to generate a token once and use it for all the requests in the monitor run - so I created a separate request to generate a token and save it as an environment variable using Postman API. However, the next requests see only the current value of the variable, which is empty as expected.
What I tried so far with no success:
- unsetting and setting the same variable - works OK for collection runner but not for monitor.
- saving the token in local, global and environment variable.
- looking up similar problems in this forum.
Thank you in advance for help and tips.