API Authentication
Learn about API authentication and JWT tokens
API Authentication
AIOS DNA uses JWT (JSON Web Tokens) for API authentication.
Getting a Token
Login Endpoint
bashcurl -X POST https://api.aiosdna.com/auth/login \-H "Content-Type: application/json" \-d '{"email": "user@example.com","password": "your-password"}'
Response:
json{"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","user": {"id": "user-123","email": "user@example.com"}}
Using the Token
Include the token in the Authorization header:
bashcurl -X GET https://api.aiosdna.com/api/kernels \-H "Authorization: Bearer your-token-here"
Token Expiration
Tokens expire after 24 hours. Refresh tokens are available for extended sessions.
Next Steps
- Learn about REST Endpoints
- Explore Code Examples