Skip to main content
POST
/
v1
/
authentication
/
verify
curl -X POST https://portal-api.7331.org/v1/authentication/verify \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-public-api-key" \
  -d '{"code": "ABCD1234"}'
{
  "user_created": false,
  "id": 1,
  "username": "niels",
  "avatar_url": null,
  "permission_level": 3,
  "subscription_level": 3,
  "subscription_expires_at": null,
  "state": "active",
  "created_at": "2025-12-01T10:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.7331.org/llms.txt

Use this file to discover all available pages before exploring further.

Verifies an 8-character login code (from either the web-initiated or bot-initiated flow) and creates a session. Returns the full user profile. Requires X-API-Key header with the public API key.
code
string
required
8-character authentication code. Case-sensitive.

Response

Returns the authenticated user’s full private profile, plus a user_created flag indicating whether a new account was created during this verification.
user_created
boolean
required
true if a new account was created (first-time signup), false for returning users.
id
integer
required
User ID.
username
string
required
Username. New accounts get a random username (e.g. user_a1b2c3d4) — changeable via POST /v1/users/me/update.
permission_level
integer
required
Permission level: 0 (User), 1 (Moderator), 2 (Admin), 3 (Owner).
subscription_level
integer
required
Subscription tier: 0 (Basic), 1 (Trial), 2 (Premium), 3 (Lifetime).
On success, an psession cookie is set in the response. Include this cookie in subsequent requests.
If the code was generated via the bot-initiated flow (/otp), a bot login counter is incremented. After 5 bot logins, the user must log in via the website once before /otp works again.
curl -X POST https://portal-api.7331.org/v1/authentication/verify \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-public-api-key" \
  -d '{"code": "ABCD1234"}'
{
  "user_created": false,
  "id": 1,
  "username": "niels",
  "avatar_url": null,
  "permission_level": 3,
  "subscription_level": 3,
  "subscription_expires_at": null,
  "state": "active",
  "created_at": "2025-12-01T10:00:00Z"
}