Runner Authentication problem

Scenario 1: When I run the API individually it shows 200OK.

But when I run the same API using the runner it shows 401 Unauthorized.

For Authorization, I am using OAuth 2.0

Please help me to Resolve.
ThankYou.

Can you show an image of the full builder view, please - Knowing the saved state of the request tabs is very important when using the Collection runner.

What Authentication does that request use, you mentioned OAuth 2.0 but how are you using that in the request? I can’t see it in the image, is that done at a higher level and then inherited by the requests?

As that’s the issue, that’s the important information here :smiley:

Hello, I face the same issue.
I generate the oauth2 token at collection level and have set all my request to inherit from parent.
When runnin the first request directly, I get 200; when running from the collection runner, it gives 401.
I workarounded by copying the access token from the colllection inside the request and changing the auth from inherit from parent to bearer. But this is valid only for the life of the token …
Which points to a more general problem in Postman, wehn using the auth2 token generator, the generated token cannot feed an env variable, which require manual copy paste …

Dragging up an old post, but I’m having the same problem.

I have an API set up with a collection that uses OAuth 2.0 for authentication, and this is inherited by all the requests. OAuth is configured in the Authorization tab on the collection. The requests work individually, but return 401 Unauthorized when executed in Runner. I have a copy of the collection outside of the API (so just in the Collections tab) and Runner works fine here, so it appears to be related to being a collection within an API.

Any ideas or pointers for what could be the problem? Happy to provide further details on request.

Thanks.

Hey, did you ever figure this out? Running into the exact same issue running the collection within an API

EDIT:
I got this to work for me, all I had to do was turn on the Share token option on the Authorization page.

2 Likes

This fixed it for me, too. Thanks!

I have the same issue. Running POST-Request manually works. Runner returns 401.
I have Authorization "Basic Auth’ in collection. POST-Request is set to “Inherit auth from parent”.

Sending POST-Request does work as required, no issues. The same request in Runner gives 401 for every single row.

I do not have a “Share token” option on the Authorization page.

Hey @payload-participan16 :wave:

Welcome to the Postman Community! :postman:

Do you have all your requests saved, unsaved changes can impact the Collection Runner.

Is the Basic Auth set ot the Collection level? Are you hardcoding these values of using variables?

What does the Postman console return for the requests that you’re sending, as part of those runs? Can you see the Auth details as part of the request headers? Are those correct?

There are a bunch of contextual details missing from your response and without being able to see what you can see, it makes it difficult to debug this further.

Hey Danny!

Sorry for the weirdness. While answering you and investigating, I seem to have located an issue. Not solved, but at least I can see the error from the API.

It has nothing to do with Postman right now. I assume it is a handling error. I am still very new to Postman.

Thank you for your quick reply!
I will provide another feedback if I cannot solve it.

Have a nice day.

1 Like