After Postman Update - Bearer Token Requests Fail with 401, but code works

Hi all - I recently updated my Postman version. I have 2 step auth fetching a Bearer token, and automatically populating an environmental variable {{authToken}} which is then used in the header. I can make a call to the auth API to log in, I can fetch the Bearer Token, it is populated correctly in the header, and I have checked that all my headers are correct (this was all working before updating).
All my subsequent calls now fail with a 401 unauthorized. Headers are all correct, bearer token is correct.
I might have thought that I had missed something, but if I go to β€œcode”, copy and paste the generated code (python) that showed 401 into a script, before the bearer token expires, and run it, it returns correctly . So the actual code is correct, I just cant seem to get it to work from Postman directly.
I am at a little bit of a loss where to go next. Any thoughts?

For those interested in what I have done. It seems that there is some kind of issue with upgrading in my environment. I am unable to use the old workspace - it fails every time now. I re-downgraded to 7.x (workspace still broken) and created a whole new workspace. Totally works. Upgraded, totally broken, but in a different more visible way now. Whereas I could not tell what the issue was previously, now there is a random %0A added into my URL (pulled from an environmental variable). This clearly was not there before, and is now. I cannot get it to not put that in. I have therefore created yet another workspace in 8.1.0 and configured it completely identically to the 7.x workspace, and it works perfectly well. My conclusion is that there is something dodgy happening in the upgrade to my workspace that does not manifest itself in the same way each time.

While I’m not an engineer here, thaaaat sounds like it might be a bug :bug:

Would you mind filing a bug report on GitHub?

Done:

1 Like

Thanks for doing so!

1 Like