☰ DiAstrologer API Docs

Admin Auth

1 endpoint(s).

Endpoint Method Summary Auth
/api/v1/admin/auth/login POST Admin Login

POST /api/v1/admin/auth/login

Admin Login

Validate env credentials and mint an admin JWT.

Constant-time comparison on email + password to avoid timing oracles. Both ADMIN_EMAIL and ADMIN_PASSWORD env vars must be set; otherwise admin login is disabled (returns 503).

Request body (application/json)

Field Type Required Description
email email yes
password string yes
totp_code any no

Response 200Token

Example

curl -X POST 'https://api.example.com/api/v1/admin/auth/login' \
  -H 'Authorization: Bearer <API_KEY>'