# Postman collection running pass but newman running fail

**URL:** <https://community.postman.com/t/postman-collection-running-pass-but-newman-running-fail/47294>\
**Category:** Help Hub\
**Tags:** newman-project\
**Created:** [May 10, 2023, 8:11am UTC](https://community.postman.com/t/postman-collection-running-pass-but-newman-running-fail/47294 "2023-05-10T08:11:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![satellite-geoscient3](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@satellite-geoscient3](https://community.postman.com/u/satellite-geoscient3)\
**Post date:** [May 10, 2023, 8:11am UTC](https://community.postman.com/t/postman-collection-running-pass-but-newman-running-fail/47294/1 "2023-05-10T08:11:45Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, 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](https://github.com/postmanlabs/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](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi  
When I run my collection from postman it works, but when I run it with newman it some request gets the “401 - Unauthorized” error.

the same token was used in both request when i checked

success request token image ;

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/4/04656a4b075a91934ba9f225bb0dcd03d7fe351d.png)

fail request token image;

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/a/3a19c0c2b4e05f323744e31720ba362335c7d97b.png)

I also exported token as variable via environment.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/9/490cce2538184f10a62fa18f22665323d194aa4d.png)

thank you for the help

Note: Have already looked at the similar posts regarding this in the community but no help
