Auth
Get Captcha Configuration
GET /v1/auth/captcha-configNo authentication required. Returns the Cloudflare Turnstile site configuration (used during front-end captcha rendering).
Response
{
"enabled": true,
"site_key": "0x..."
}Check if User Exists
POST /v1/auth/checkRequest Body
| Field | Type | Description |
|---|---|---|
login | string | Username or email |
Response
{
"exists": true
}Query Registration Mode
GET /v1/auth/registration-modeResponse
{
"mode": "open"
}mode values: open (open), invite_only (invitation only), disabled (closed).
Register
POST /v1/auth/registerRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
login | string | Yes | Username |
password | string | Yes | Password |
email | string | Yes | |
invite_code | string | Conditional | Required in invitation-only mode |
locale | string | No | Language preference |
cf_turnstile_token | string | Conditional | Required when Turnstile is enabled |
Response
{
"user_id": "...",
"access_token": "...",
"token_type": "bearer",
"warning": null
}On success, the server issues the Refresh Token via Set-Cookie (HttpOnly cookie: arkloop_refresh_token).
Login
POST /v1/auth/loginRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
login | string | Yes | Username or email |
password | string | Yes | Password |
cf_turnstile_token | string | Conditional | Required when Turnstile is enabled |
Response
{
"access_token": "...",
"token_type": "bearer"
}On success, the server issues the Refresh Token via Set-Cookie (HttpOnly cookie: arkloop_refresh_token).
Refresh Token
POST /v1/auth/refreshNotes
No request body is required. The server reads and rotates the Refresh Token from the HttpOnly cookie arkloop_refresh_token.
Response — Same format as login response (only access_token, token_type), and the Refresh Token cookie will be updated.
Logout
POST /v1/auth/logoutRequires Bearer Token. Invalidates the current token and clears the Refresh Token cookie.
Response
{ "ok": true }Email Verification — Send Verification Email
POST /v1/auth/email/verify/sendNo request body. Uses the current logged-in user's email.
Email Verification — Confirm
POST /v1/auth/email/verify/confirmRequest Body
| Field | Type | Required |
|---|---|---|
token | string | Yes |
Email OTP Login — Send OTP
POST /v1/auth/email/otp/sendRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Target email |
cf_turnstile_token | string | Conditional |
Email OTP Login — Verify OTP
POST /v1/auth/email/otp/verifyRequest Body
| Field | Type | Required |
|---|---|---|
email | string | Yes |
otp | string | Yes |
Response — Same format as login response (includes access_token, token_type), and the Refresh Token cookie will be updated.