Keep getting 401 Unauthorized answer for requests in Newman.
I have a collection in Postman which I'm trying to execute in Newman. I exported it and tried to execute using this command:
newman run collection.json -g globals.json --insecure
Collection.json being the collection which I'm trying to run and globals.json containing the bearer token which I give to collection and is being inherited from folder brand for each request.
The same collection runs perfectly with this token in Postman but when I try in Newman it keeps giving 401.
What's the issue? Should I put directly the bearer token in each request and not use it separately as a global?