Authentication
You'll need to authenticate your requests to access any of the endpoints in the bronID API. To authenticate your bronID API calls you need to provide authentication headers which will include your API keys.
Important: Your bronID API keys can be used to access sensitive information. Therefore, they must always be kept secret. You should never commit them to your version control system repository (such as Git) and use environment variables (e.g. via .env files) to store and use them.
Never expose your API keys in client-side code.
Never share your API keys in any communication, such as email, chat or similar.
Authenticate your bronID API calls
You can use 2 authentication methods with the bronID API:
- Basic Authentication
- API Key Authentication
Both methods use your Service UID and API key (secret key) parameters via the Authorization header of the HTTP request.
Basic authentication
When authenticating using Basic Authentication, the Authorization header value sent with the request should start with the keyword Basic. The credentials should be base64-encoded in the format SERVICE_UID:API_KEY.
Example header
Authorization: Basic dXNlcklkOmFwaUtleQ== (where dXNlcklkOmFwaUtleQ== is the base64 encoding of SERVICE_UID:API_KEY).
How to setup in Postman
- when creating a request (e.g. a GET or POST request), click the Authorization (Auth) tab which is located below the URL field
- select Basic Auth from the Auth type dropdown menu
- enter your Service UID and API key in the Username and Password fields respectively.
- Postman will automatically encode the credentials in the base64 format.
How to use with cURL
Example request with basic auth
# Replace YOUR_SERVICE_UID and YOUR_API_KEY with your credentials
curl --user YOUR_SERVICE_UID:YOUR_API_KEY \
"https://dev.bronid.com/v5/lookup?id=33051775556&country=AUS"
API Key Authentication
When authenticating using API Key Authentication, the Authorization header value sent with the request should start with the keyword ApiKey. The credentials should be in the format SERVICE_UID:API_KEY.
Example header
Authorization: ApiKey {{SERVICE_UID}}:{{API_KEY}}
How to setup in Postman
- when creating a request (e.g. a GET or POST request), click the Authorization (Auth) tab which is located below the URL field
- select API Key from the Auth type dropdown menu
- in the Key field, enter ”Authorization” (this is a fixed value and represents the header name)
- in the Value field, enter your Service Uid and API Key along with the
ApiKeyprefix in the following format:ApiKey {{SERVICE_UID}}:{{API_KEY}} - select Header from the Add to dropdown menu
How to use with cURL
Example request with basic auth
# Replace YOUR_SERVICE_UID and YOUR_API_KEY with your credentials
curl -H "Authorization: ApiKey YOUR_SERVICE_UID:YOUR_API_KEY" \
"https://dev.bronid.com/v5/lookup?id=33051775556&country=AUS"