Reputation: 11
I'm running into an issue with my Postman setup when executing collections through the Postman CLI . Specifically, I'm trying to dynamically set the access_token
and token_expiry
variables from a pre-request script before each request.
But it works fine while using running collection from postman GUI.
below ones are tried, but unable to resolve
pm.variables.set("access_token", newToken);
pm.variables.set("token_expiry", newExpiryTime);
and
pm.collectionVariables.set("access_token", newToken);
pm.collectionVariables.set("token_expiry", newExpiryTime);
Upvotes: 1
Views: 28