Authentication
All requests made to the Brails API must be authenticated using an API key.
Getting Your API Key
To start interacting with the Brails API, you will need an API key:
- Go to your Dashboard and navigate to Settings (sandbox (opens in a new tab) or production (opens in a new tab) )
- Click on Generate a new key to create your API key.
How to Authenticate Requests
To authenticate your API requests, include your API key in the header of each request:
API Key Authorization Example:
📘
Authorization: Bearer BRAILS-API-KEY
If an expired or incorrect API key is used, the request will return an error.
API Key Security
Keeping your API key secure is crucial:
- Do not hardcode your API keys in your codebase, as they grant access to your account and can be used to perform unrestricted transactions.
- Use test API keys for sandbox environments and production API keys when you are ready to go live.
- Always separate your API credentials from your codebase.
All API Requests should be made via HTTPS
- Make sure all API requests are sent over HTTPS. Any requests not made over HTTP will be rejected for security reasons.
🚧
Following these practices, you’ll ensure that your API keys remain secure and your transactions are protected.