My question:
Hello, I have been trying to get a token from a post request:
Post https://auth.mysite.com/oxauth/login
The body includes username and password, when I send this request from the console I can see 4 requests being sent:
Post https://auth.mysite.com/oxauth/login
Get https://auth.mysite.com/oxauth/authorize?scope…
Get https://auth.mysite.com/oxauth/authorize?scope=Email+permission
Get https://auth.mysite.com/#/login-callback/&access_token=9180228c-ef88-43d4-bh83-7fe587542f06
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}
);
console.log(pm.request.url.query.toObject())
but both are empty