Storing Tokens From Authorization Call In Data File

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.

Question:
How to save the token from “Authorization” API call to the token column in the data file so that I can pass it to the next (searchcase) API call for use?

Screenshots:

How I found the problem:

I am trying to use data driven testing where the subsequent requests need input from previous requests.

I’ve already tried:

I have tried to use just postman to run them. Runs fine with environment variables but when I provide the data file it fails as I don’t know how to save the the value back to the data file for the next call.

I’m using newman to run this:

npx newman run '.\postman_collection.json' -d '.\Data02172022.csv' --delay-request 5000 --reporters=cli,htmlextra

Error is attached.

I tried to use the environment variable file and data file together in newman but couldn’t figure it out.

Sorry we didn’t get to this sooner. This isn’t the experience we want for our users.

We’re closing out older posts to help keep the community organized and relevant. You cannot write data directly into a local file from Postman.