My question: When I use Postman to run individual requests in a collection, they successfully authenticate using the same Bearer token stored in a global variable.
When I use my SaaS app to trigger the collection from a Newman webhook, I get a 401 response on the individual calls.
Any suggestions of where I might start looking?
Details: I created a Newman webhook URL (api.getpostman.com/webhooks?workspace) for my SaaS app to trigger a collection.
- The first call parses the payload and assigns variables for later use.
*The second call in the collection generates a Bearer token from the app and stores it as a global variable.
*The third call uses the globally stored Bearer token to POST an update to the record from the original payload.
*The fourth call uses the globally stored Bearer token to GET additional record information about the record from the original payload.
How I found the problem: Running the collection from Postman works as expected but running the collection by calling the Newman webhook URL returns a 401 response on the third and fourth calls.
I’ve already tried: I am logging the Bearer token and it displays in Postman console. In the Monitor console, the value shows blank.
Is there some nuance with Newman webhook and collections that I missed?