how I can do a request with a bearer auth token? #175
-
Hi, tired of using postman to test my API, I decided to try this new application, I have an APIREST that uses authorization with JWT token in the option that postma usually uses as “bearer token”, seeing that it is a header called “Authorization”, I tried to manually add it to my request but when I try to make the request it tells me HTTP error and does not execute the request. I would like to know what I am doing wrong to do it correctly. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi. If you are using Cartero 0.1.5 or an earlier version, to use bearer tokens you have to add a header called "Authorization" with the value formatted as "Bearer {token}", in other words, the word Bearer, a space, then the token, like a JWT token. So if you have a JWT token that looks like this: If you are using a nightly version of Cartero (or Cartero 0.2.0, once it's released) where the authorization tab has already been added, you can go to the Authorization tab and select "Bearer token" from the authorization method, then paste the token in the Token field. The program will automatically configure the Authorization header for you when you send the request. |
Beta Was this translation helpful? Give feedback.
Hi.
If you are using Cartero 0.1.5 or an earlier version, to use bearer tokens you have to add a header called "Authorization" with the value formatted as "Bearer {token}", in other words, the word Bearer, a space, then the token, like a JWT token.
So if you have a JWT token that looks like this:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJz...
, you would add a header called "Authorization" with the value "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJz...".If you are using a nightly version of Cartero (or Cartero 0.2.0, once it's released) where the authorization tab has already been added, you can go to the Authorization tab and select "Bearer token" from the authorization method, then p…