AIOS DNA

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

bash
curl -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:

bash
curl -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

Was this helpful?