This method requires sending a username and password encoded in Base64 in the Authorization header of API requests. The username corresponds to the Consumer Key, and the password corresponds to the Consumer Secret issued when creating an app.
- Send Credentials: The client application includes the Authorization header in its API requests.
- Validate Credentials: The server validates the provided Consumer Key and Consumer Secret.
- Access Resources: Upon successful validation, the server allows access to the requested resources.
Example Usage:
# GET Request with Basic Authentication
curl -X GET \
'https://api.example.com/resource' \
-H 'Authorization: Basic [[Authorization-masked-secret]]'
# POST Request with Basic Authentication
curl -X POST \
'https://api.example.com/resource' \
-H 'Authorization: Basic [[Authorization-masked-secret]]' \
-H 'Content-Type: application/json' \
-d '{"key":"value"}'
In this example, replace [[Authorization-masked-secret]] with your Base64-encoded credentials and use the actual endpoint.
In the Postman environment, use the Client Key and Secret from your sandbox app to populate the related variables in Postman's Sandbox Credentials environment group.