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.
Fetches a pending login code that was initiated on the website. The bot picks up the code and DMs it to the user.
This is the second step in the web-initiated login flow:
- User enters their platform ID on the website →
POST /v1/authentication/request
- Bot calls this endpoint to fetch the pending code
- Bot DMs the code to the user
- User enters the code →
POST /v1/authentication/verify
The bot’s /otp command automatically falls back to this endpoint when quick login returns 404 (user doesn’t exist yet).
Platform identifier (e.g. discord, telegram).
Platform-specific user ID to get the login code for.
User’s current username on the platform.
User’s current avatar URL on the platform.
Response
User’s login code if one exists. null if no pending code.
ISO 8601 UTC timestamp for when the code expires. null if no pending code.
curl -X POST https://portal-api.7331.org/v1/authentication/bot/login-code \
-H "Content-Type: application/json" \
-H "X-API-Key: your-bot-api-key" \
-d '{
"platform": "discord",
"platform_user_id": "123456789012345678",
"platform_username": "niels",
"platform_avatar_url": "https://cdn.discordapp.com/avatars/123456789012345678/abc.png"
}'