Get URL parameters from future GET request

My question:

Hello, I have been trying to get a token from a post request:


The body includes username and password, when I send this request from the console I can see 4 requests being sent:


I need to find a way to get that access_token and save it in an environment variable, I’m new in postman and I don’t know how to access a chain response like that one.

I have tried with this one

const responseJson = pm.response.headers.get(‘location’);

console.log(Response URL: ${responseJson});


but both are empty

The OAuth flow is a bit more special since it involves a browser and a callback to Postman. I doubt you can grab the callback parameters from scripts with pm.request.

Do you have any other suggestions that I can take a look?

It would help if you could add more details regarding what you are actually trying to accomplish with Postman and some screenshots showing what you have tried so far.

thanks for the awesome information.