-u shorthand or provide the explicit Authorization header.
Using
-u username:token is equivalent to sending Authorization: Basic <base64(username:token)>.Quick Example
Understanding Basic Authentication Examples
You may notice some examples show the explicitAuthorization: Basic <encoded-value> header. This is functionally identical to the simpler cURL shorthand:
-u flag tells curl to automatically create and Base64-encode your <username>:<API-token> string.
If you need to manually generate the required Base64 <encoded-value> for use in another tool (or to copy into examples):
- Combine your credentials:
<username>:<API-token>(e.g.,janedoe:tok_12345) - Encode the string using one of the following methods:
Once you have the encoded value, you can use it with an explicit header:
Sandbox vs Production
Use your sandbox credentials for the development environment (https://api.dev.name.com) and production credentials for https://api.name.com.