Postman supports setting environment variables and using them in, say, headers.
Consider the following example:
- Token endpoint
/auth/token
requires basicAuthorization
header:Basic {{AUTH_BASIC}}
- All other endpoints requires bearer
Authorization
header:Bearer {{AUTH_TOKEN}}
Currently, I need to go through all the following steps, which is very annoying:
- Call
/auth/token
- Manually copy the token from the response
- Go to
Settings > Manage Environments > MyEnvironment
- Paste the token against
AUTH_TOKEN
and clickUpdate
Is there a way to automatically update the AUTH_TOKEN
environment variable each time when I call /auth/token
or at least always display list of current environment variables so I can manually update values without going to Settings > Manage Environments > MyEnvironment
?