How to automatically set new token's value as a dynamic variable and use this variable in my collection of requests?

@bpricilla @praveendvd Thanks for your help!
I’ve used environment variables and the following test in login request:

var jsonData = JSON.parse(responseBody);
var token = jsonData[‘access_token’];
pm.environment.set(“token”, jsonData.token);

…in order to achieve it.
Then for every next request I’ve used Bearer {{token}}.

I hope this will help other people who have the same issue like me.
Thanks a lot to the community!
See you on the next topic, bye.

Best regards,

3 Likes