Authentication
The Artos API uses Bearer token authentication. All endpoints require a valid Bearer token to be included in theAuthorization header, except for /api/v1/search/status which is publicly accessible.
Bearer Token Authentication
Getting a Token
Obtain a Bearer token from your organization administrator. The token grants access scoped to your organization and enables all authenticated operations.Using Bearer Tokens
Include the token in theAuthorization header as a Bearer token for all requests:
Example API Request
Python Example
JavaScript Example
Token Format and Claims
Bearer tokens are JWT tokens containing organization and user context. The token automatically provides:- Organization ID: Scopes all resource access to your organization
- User ID: Identifies the authenticated user for audit trails
- Permissions: Controls which operations are available
- Expiration: Token validity period
Organization Scoping
All resources are automatically scoped to your organization. A user’s token contains their organization context, ensuring:- Users can only access their organization’s resources
- Resources are automatically filtered by organization
- Cross-organization access is prevented
- Multi-tenant isolation is enforced
Example
When you make a request:Error Responses
Missing Authorization Header (401 Unauthorized)
Invalid Token (401 Unauthorized)
- Token is malformed
- Token has expired
- Token was issued for a different organization
- Token has been revoked
Wrong Organization (403 Forbidden)
- Token is for a different organization
- User account is not properly configured
Public Endpoints (No Auth Required)
The/api/v1/search/status endpoint is publicly accessible and does not require authentication:
Security Best Practices
Token Storage
- Never commit tokens to version control systems
- Use environment variables for token management
- Store securely in your application’s secret management system
- Don’t log tokens in debug output or error messages
Token Usage
Token Rotation
- Request a new token periodically from your organization administrator
- Rotate tokens in case of suspected compromise
- Revoke tokens when team members leave
HTTPS Only
Always use HTTPS when making API requests with Bearer tokens:Common Issues
”Not authenticated” Error
The most common cause is a missing or malformed Authorization header. Check:- Is the Authorization header present?
- Does it use the correct format:
Authorization: Bearer TOKEN? - Is the token valid and not expired?
- Is the token for your organization?
”Invalid authentication credentials” Error
The token provided is not valid. Solutions:- Verify the token value is correct (no extra spaces or characters)
- Obtain a fresh token from your administrator
- Check that the token hasn’t been revoked
- Ensure the token is for the correct environment (production vs. staging)
Token Handling in Different Languages
Python with Requests
Node.js with Fetch
Go
Support
If you have issues with authentication:- Contact your organization administrator to verify your token is valid
- Check the endpoint documentation to confirm the endpoint requires authentication
- Review error responses for specific details about what went wrong
- Verify HTTPS is being used for all requests with authentication