Authentication with the Hiya API
If you are using the Audio Intelligence APIs, see Bearer tokens.
The Hiya API uses Basic HTTP Authentication over HTTPS, secured through API keys assigned specifically to you. Authentication requires a header field formatted as follows:
Authorization: Basic <credentials>
Here, <credentials>
is a base64-encoded string that combines your App ID and App Secret, joined by a single colon (:
).
Steps to Generate the Base64-Encoded Credentials
- Concatenate your App ID and App Secret, separated by a colon:
App ID: PROD_SampleApp
App Secret: SecretString
Concatenated String: PROD_SampleApp:SecretString
- Encode the concatenated string using base64:
Base64EncodingFunction("PROD_SampleApp:SecretString")
This outputs:
UFJPRF9TYW1wbGVBcHA6U2VjcmV0U3RyaW5n
Example HTTP Header for Requests
Include the Authorization
header with the base64-encoded credentials in all API requests:
Authorization: Basic UFJPRF9TYW1wbGVBcHA6U2VjcmV0U3RyaW5n
To prevent authentication errors, ensure:
- No leading or trailing spaces are added to the encoded string.
- The string has no carriage returns or line breaks.