Skip to content

Authentication ​

Atiru supports two authentication methods: session (JWT) for the dashboard and API keys for programmatic access.

Dashboard: Register and login ​

Register ​

  1. Go to atiru.io.
  2. Click Register.
  3. Enter your email and password (minimum 6 characters).
  4. Check your email and click the confirmation link.
  5. You are redirected to the dashboard after confirmation.

Login ​

  1. Go to atiru.io.
  2. Enter your email and password.
  3. Click Login.

If your email is not yet confirmed, you will see an error. Use the confirmation link sent to your inbox.

API: Login ​

Use POST /auth/login to obtain a session token for API calls (e.g. when managing API keys).

Request

json
{
  "email": "you@example.com",
  "password": "your_password"
}
bash
curl -X POST "https://api.atiru.io/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your_password"}'
javascript
const res = await fetch('https://api.atiru.io/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email: 'you@example.com', password: 'your_password' }),
})
const { user, session } = await res.json()
const accessToken = session.access_token
python
import requests

res = requests.post(
    "https://api.atiru.io/auth/login",
    json={"email": "you@example.com", "password": "your_password"},
)
data = res.json()
access_token = data["session"]["access_token"]

Response (200)

json
{
  "user": {
    "id": "uuid",
    "email": "you@example.com",
    "created_at": "...",
    "updated_at": "..."
  },
  "session": {
    "access_token": "eyJ...",
    "refresh_token": "...",
    "expires_in": 3600,
    "expires_at": 1234567890,
    "token_type": "bearer"
  }
}

Auth headers for API calls ​

For authenticated endpoints, use one of:

  • Authorization: Authorization: Bearer <your_api_key_or_jwt>
  • X-Api-Key: X-Api-Key: <your_api_key>

API keys are preferred for scripts and server-to-server calls. JWTs are used for dashboard flows and for managing API keys (create, list, revoke).