Authentication
Authentication
API Key
- All Vadoo AI APIs require authentication using an API key. You must include your API key in the request headers for all API calls:
Obtaining an API Key
-
To obtain an API key:
-
- Go to the Vadoo AI Dashboard
-
- Sign in to your account or create a new account
-
- Navigate to the API Keys section
-
- Generate a new API key
-
- Copy and securely store your API key
Security Best Practices
- Never share your API key: Keep your API key confidential
- Don’t hardcode API keys: Use environment variables or secure key management systems
- Rotate keys periodically: Regularly generate new API keys and deprecate old ones
- Use restricted keys: When possible, create keys with limited permissions
- Keep safe: The API key will only be shown once. Please copy and store it securely. You won’t be able to retrieve it again.
Example Usage
1. cURL
curl --location --request POST 'https://muapi.ai/api/v1/endpoint' \
--header "Content-Type: application/json" \
--header "x-api-key: {MUAPIAPP_API_KEY}" \
--data-raw '{"param1": "value1", "param2": "value2"}
2. Python
import requests
import json
headers = {
"x-api-key": f"{MUAPIAPP_API_KEY}",
"Content-Type": "application/json"
}
payload = {
"param1": "value1",
"param2": "value2"
}
response = requests.post("https://api.muapi.ai/api/v1/endpoint", json=payload, headers=headers)
print(response.json())
3. Javascript
const apiKey = process.env.MUAPIAPP_API_KEY;
const headers = {
'x-api-key': `${apiKey}`,
'Content-Type': 'application/json'
};
const payload = {
param1: 'value1',
param2: 'value2'
};
fetch('https://muapi.ai/api/v1/endpoint', {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));