Skip to main content

Authentication

All Veez.ai API requests require authentication using a Bearer token in the request header.

API Token Format

Your API token must be included in the Authorization header with the Bearer prefix:

Authorization: Bearer r8_Hw***********************************

Getting Your API Token

Contact Administrator

API tokens are currently issued by the Veez.ai administrator. Please contact your account manager or send an email to support@veez.ai to obtain your token.

Example Usage

cURL

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://app.veez.ai/api/template/

JavaScript (Fetch)

const response = await fetch('https://app.veez.ai/api/template/', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});

Python (Requests)

import requests

headers = {
'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://app.veez.ai/api/template/', headers=headers)

PHP

$headers = [
'Authorization: Bearer YOUR_API_TOKEN'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.veez.ai/api/template/');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

Environment Variables

For security, store your API token as an environment variable:

Bash/Zsh

export VEEZAI_API_TOKEN="your_token_here"
curl -H "Authorization: Bearer $VEEZAI_API_TOKEN" \
https://app.veez.ai/api/template/

Node.js (.env)

VEEZAI_API_TOKEN=your_token_here
require('dotenv').config();

const token = process.env.VEEZAI_API_TOKEN;
const headers = {
'Authorization': `Bearer ${token}`
};

Error Responses

401 Unauthorized

{
"error": "Unauthorized",
"message": "Invalid or missing API token"
}

Common causes:

  • Missing Authorization header
  • Invalid token format (missing Bearer prefix)
  • Expired or revoked token

403 Forbidden

{
"error": "Forbidden",
"message": "Insufficient permissions"
}

Common causes:

  • Token doesn't have required permissions
  • Account limitations or restrictions

Best Practices

Security
  • Never expose your API token in client-side code or public repositories
  • Use environment variables to store tokens securely
  • Rotate tokens regularly for enhanced security
  • Monitor usage to detect unauthorized access
Rate Limiting

The API may have rate limits. If you encounter 429 status codes, implement exponential backoff in your requests.

Next Steps

Now that you're authenticated, explore the available resources: