Authentication
Learn how to authenticate with the AIDP Platform API.
AIDP uses JWT (JSON Web Tokens) for authentication. All API requests require a valid API key or JWT token.
Authentication Flow
Getting an API Key
Create an account at platform.aidp.dev
2. Generate API Key
Navigate to Settings → API Keys
Give it a descriptive name (e.g., "Production API")
Copy the key immediately (it won't be shown again)
Store securely (never commit to version control)
Include in the Authorization header:
For development and testing:
Characteristics:
Access to sandbox environment
Rate limited (100 req/hour)
For production use:
Characteristics:
Access to production environment
Authentication Methods
1. API Key (Recommended)
Simple and secure for server-to-server communication.
TypeScript:
Python:
cURL:
For user-specific authentication (web/mobile apps).
Login:
Response:
Use Token:
For third-party integrations.
Authorization URL:
Exchange Code for Token:
Access tokens expire after 1 hour. Use refresh tokens to get new ones:
Response:
Control access with OAuth scopes:
Example:
Security Best Practices
Storing API Keys
✅ Do:
Use environment variables
Use secret management services (AWS Secrets Manager, HashiCorp Vault)
Use different keys for dev/staging/prod
❌ Don't:
Commit keys to version control
Share keys via email/chat
Use same key across environments
Example (.env):
Example (code):
Rotate API keys regularly:
Update applications with new key
Monitor API key usage:
Set up alerts for unusual activity
Review access logs regularly
401 Unauthorized
Causes:
Missing Authorization header
Solution:
Ensure header is included
Generate new key if revoked
Causes:
Solution:
Ensure proper permissions
API keys have rate limits based on plan:
Headers:
Learn more about rate limiting →
TypeScript/JavaScript
Sandbox Environment
Test authentication without affecting production:
Postman Collection
Import our Postman collection for easy testing:
Need help with authentication?
Last updated