I am trying to call an API which I have been instructed:
This is expecting an Authorization header: Bearer Access Token.
I have the Bearer Access Token, and have tried via Postman, and via C# using WebRequest, to no avail.
Within Postman I have the method set as GET, Authorization set as No Auth, on the Headers tab I have tried adding one header like so:
Header: "Authorization"
Value: "mytoken"
I have also tried
Header: "Bearer"
Value: "mytoken"
Also
Header: "Authorization"
Value: "Bearer mytoken"
I think maybe it does not work in Postman because of some other headers sent from within PM, but surely from a test C# console application this should work?
What is the right way to give an API the bearer access token? Is the token meant to be encoded?
Try to add this line in your header on Postman:
Authorization: Bearer <token>
It should work...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.