Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
I’m working with an OAuth-like flow where I:
- Send a
POSTrequest to/authorise/authenticatewith credentials. - That request responds with a
302redirect to aGETURL like:
https://example.com/?code=abc123&state=xyz
I’m running this as part of a Postman collection (potentially via Newman later), and I need to extract the code parameter from that redirected GET URL.
But I’ve found that Postman:
- Follows redirects automatically
- Does not expose the final redirected URL in the response object
- Doesn’t allow me to access it in scripts (pre-request/test)
Is there any way (via scripting, settings, or workarounds) to catch that code from the redirect URL inside Postman?
Just in case - the ultimate goal is to make this collection run fully headless (no UI interaction) so we can integrate it into our CI/CD pipeline using Newman.