# Newman pre-request script

**URL:** <https://community.postman.com/t/newman-pre-request-script/24423>\
**Category:** Help Hub\
**Created:** [June 2, 2021, 4:17pm UTC](https://community.postman.com/t/newman-pre-request-script/24423 "2021-06-02T16:17:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkevinburton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rkevinburton/32/273_2.png) [@rkevinburton](https://community.postman.com/u/rkevinburton)\
**Post date:** [June 2, 2021, 4:17pm UTC](https://community.postman.com/t/newman-pre-request-script/24423/1 "2021-06-02T16:17:07Z")

</div>

I am trying out ‘newman’ on my collection and it seems that I am getting a 401 (Unauthorized) response back. So I have two questions. The first is isn’t 401 considered an error? The summary in the end shows no tests failed? The second question is regarding the pre-request scripts. When I run the API tests from the Postman app the pre-request script are run and I don’t get the 401 responses. So my question is how do I get newman to act more like the Postman app?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 7, 2025, 5:24pm UTC](https://community.postman.com/t/newman-pre-request-script/24423/2 "2025-04-07T17:24:51Z")

</div>

Closed on April 7, 2025, 5:24pm UTC

Thanks for your post, and sorry we didn’t get to this sooner. This isn’t the experience we want for our users.

Since the post is a bit older, we’re closing it to make room for newer discussions. If you’re still experiencing this or have new details to share, we’d love for you to start a new discussion.
