Jump to
Authentication
All Vectorly API endpoints require authentication using service tokens via Bearer token authentication.
Getting a service token:
To use the Vectorly API, you need a service token. Create an account and generate a service token from the Vectorly console.
Get service tokenOnce you have an account, you can create and manage service tokens from the Vectorly console.
Overview:
The Vectorly API uses Bearer token authentication. Include your service token in the Authorization header with every request.
Making authenticated requests:
Header format
Authorization: Bearer YOUR_SERVICE_TOKENcURL example
bash
Python example
Python
JavaScript/Node.js example
JavaScript
Error responses:
401 Unauthorized
Returned when the service token is missing, invalid, expired, or revoked.
JSON
Common issues:
• Missing Authorization header
• Incorrect Bearer prefix (must be "Bearer " with a space)
• Expired or revoked service token
• Invalid service token format
• Service token not generated from https://console.vectorly.app
Security best practices:
1. Keep service tokens secret
Never commit service tokens to version control. Use environment variables or secure secret management systems.
2. Use environment variables
export VECTORLY_SERVICE_TOKEN="your-service-token-here"3. Server-side only
Never use service tokens in client-side JavaScript. Service tokens should only be used in secure server environments.
4. Rotate tokens regularly
Regularly rotate service tokens for security. Generate a new token from the console, update integrations, then revoke the old token.