I am trying to create a header for an authorization bearer token that I generated from the API's side. I am using CORS-anywhere to call the API and get the data through JSON. I was wondering, what is the correct format for the authorization bearer token header?
Without any more information to go off of, typically an Authorization
header that uses a bearer token should look like the following:
Authorization: Bearer mF_9.B5f-4.1JqM
In javascript, typically it involves setting the Authorization
property of a headers object:
// headers you pass to a http request
let headers = {
'Authorization': 'Bearer ' + token
};
Usually a http request library will taken in a parameter for headers somewhere that you would pass this to.
Is there something more specific you want to know?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With