Authentication
Obtaining Your API Key
To access the API, you need an API key. Please contact our sales team to obtain your key.
Authentication Type
The API uses Basic Authentication for secure access.
Authentication Format
To authenticate, include the Authorization header in every API request. The header should contain a Base64-encoded string of your email address and API key.
Format:
Authorization: Basic BASE64_ENCODED_CREDENTIALS
Where BASE64_ENCODED_CREDENTIALS is the Base64 encoding of:
YOUR_EMAIL:YOUR_API_KEY
How to Generate Your Credentials
- Combine your email and API key with a colon separator:
YOUR_EMAIL:YOUR_API_KEY - Encode the combined string using Base64
Example
If your email is [email protected] and your API key is abc123:
- Combine them:
[email protected]:abc123 - Base64 encode:
dXNlckBleGFtcGxlLmNvbTphYmMxMjM= - Add the header:
Authorization: Basic dXNlckBleGFtcGxlLmNvbTphYmMxMjM=
Code Examples
cURL
curl -X GET "https://api.example.com/endpoint" \
-H "Authorization: Basic $(echo -n '[email protected]:abc123' | base64)"Python
import base64
import requests
email = "[email protected]"
api_key = "abc123"
credentials = base64.b64encode(f"{email}:{api_key}".encode()).decode()
headers = {
"Authorization": f"Basic {credentials}"
}
response = requests.get("https://api.example.com/endpoint", headers=headers)JavaScript (Node.js)
const email = "[email protected]";
const apiKey = "abc123";
const credentials = Buffer.from(`${email}:${apiKey}`).toString("base64");
const response = await fetch("https://api.example.com/endpoint", {
headers: {
"Authorization": `Basic ${credentials}`
}
});Updated 14 days ago
