Authenticating with the Voila API
This page helps you set up your headers for sending API requests to Voila.
Last updated 4 months ago

Authenticating with the Voila API
To securely access Voila’s API, you must authenticate each request. There are two supported authentication methods:
Voila Headers
HTTP Basic authentication
Method 1: Voila Headers
For every API request, include the following headers:
api-user: Your Voila API Account Nameapi-token: Your Voila API token
Example:
api-user: your_username
api-token: your_token This method is straightforward and works with most HTTP clients and tools such as Postman.

Method 2: HTTP Basic Authentication
Alternatively, you can use HTTP Basic authentication. This combines your API username and token into a single header.
Concatenate your API username and token with a colon:
your_username:your_tokenEncode this string in Base64. For example, if your username is
adminand your token issecret, the combined string is:admin:secretThe Base64-encoded value is:
YWRtaW46c2VjcmV0Add the following header to your request:
Authorization: Basic YWRtaW46c2VjcmV0
This method is widely supported and may be required by some HTTP libraries or integration tools.
Tip:
If you use Postman, you can specify the api-user and api-token headers directly, or set up Basic authentication by providing your username and token in the “Authorization” tab.
Note:
Always keep your API credentials secure. Do not share your token publicly or hard-code it in client-side code.
