Curl - Connect to a REST API with an API Key

by
Jeremy Canfield |
Updated: January 24 2024
| Curl articles
There are a couple similar but unique ways to connect to a REST API without basic authentication (username / password).
- Connect to a REST API with an API Key (this article)
- Connect to a REST API with an OAuth Bearer Token
Let's say there is a REST API that is configured to allow connections with an API Key. Here is an example of how you could connect to the REST API with an API Key.
curl
--request GET
--header "Authorization: ApiKey abc123"
--url "https://api.example.com/foo/bar"
Did you find this article helpful?
If so, consider buying me a coffee over at