newman icon indicating copy to clipboard operation
newman copied to clipboard

When using OAuth 2.0 , collection is failing from CLI

Open bhargavi1716 opened this issue 4 years ago • 2 comments

Hello team,

I am using OAuth 2.0 as the Authorization Type and passing oAuth Token and Header Prefix as "OAuth". The collection runs fine in POSTMAN but not in CLI with NEWMAN.

I have printed the Authorization value and it is showing as "BEARER" instead of "OAuth", causing to get the "INVALID AUTHORIZATION HEADER". Kindly look into this ASAP.

image image

bhargavi1716 avatar Sep 21 '20 18:09 bhargavi1716

I have same issue, but I use No Auth option and key 'Authorization' in Header When tests run by link - request have Bearer prefix When tests run by exported file - request doesn't have prefix

MyrZiKus avatar Nov 16 '20 12:11 MyrZiKus

Same issue, I have a bearer token in the environment vars, but Newman is not picking that up. Only when I hard-code the token in the collection json does it work.

jonathanniels avatar Mar 25 '21 12:03 jonathanniels