I have set up a collection in PostMan and am able to save my bearer token value to an environment variable successfully using the following test
var jsonData = JSON.parse(responseBody);
pm.environment.set("mytoken", jsonData.token);
but how do I set up a new call to use it?
I have tried adding a Header with
Authorization Bearer <mytoken>
but when I Post the Status is 401 Unauthorized
Like the way Kristen, said. Or else download latest postman desktop application, in that in authorization they have an option to add bearer token in the header
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments