I have a 3-legged OAuth setup.
The first step returns a redirect with a Location header that has the authorization token (code) as a query parameter.
This header looks like follows -
Location: https://b7af580a-bc88-4ab7-b9ad-bf367ad823d0.mock.pstmn.io?code=fGTxeQG8&scope=actionShipmentCreate%20actionShipmentEdit
I want to extract the value of the query param “code” whose value is “fGTxeQG8” so I can save it in a collection variable and use it in the next step for getting an access token.
How do I do this?
Since postman doesn’t recognize this as a URL object, none of the standard methods are working, such as what works on the request URL itself, which postman understands as a URL object and parses easily.