Forrest logo
back to the curl tool

curl:warp:ddb2d3519798374d4b76ef0160a84b72

Set an Bearer authorization header with a cURL request
$ curl -H "Authorization: Bearer ${access_token}" ${url}
try on your machine

The command "curl" is a popular command-line tool used to make HTTP requests. It is commonly used to interact with APIs and fetch data from web services.

The "-H" option is used to include additional HTTP headers in the request. In this case, the header being added is "Authorization", followed by the "Bearer" keyword. The value of this header is set to the access token variable "${access_token}". The access token is typically obtained by authenticating with the web service or API.

The "${url}" variable represents the URL of the API endpoint or web service that the request is being made to.

So, in summary, this curl command is making an HTTP request to a URL specified by "${url}". It includes an "Authorization" header with an access token value provided by "${access_token}". This is a common way to authenticate and authorize API requests when using bearer tokens.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the curl tool