Login
Obtains a Bearer token required for authenticated requests.
Bot Protection
This endpoint requires a valid Cloudflare Turnstile token when bot protection is enabled. See the Turnstile Integration Guide for frontend setup instructions.
HTTP Request
POST /api/v1/auth/login
| Parameter | Description |
|---|---|
email string | Email address |
password string | User's password |
turnstileToken string | Cloudflare Turnstile verification token. |
Response
200 OK
json
{
"data": {
"token": "3|4UgEk8lXwa1D6rbYO8fqMfKhgnwdRuSqZb4Woz083ad0785f"
}
}The token is a Bearer token that must be included in the Authorization header for all authenticated requests:
plaintext
Authorization: Bearer 3|4UgEk8lXwa1D6rbYO8fqMfKhgnwdRuSqZb4Woz083ad0785fError Handling
If credentials are invalid, the server responds with:
401 Unauthorized
json
{
"message": "Unauthenticated."
}