Skip to content

POST /verify/init

Starts a Pi verification session. Called by your server, not the end user's browser.

Authentication

Authorization: Bearer auth314_<your key>

Create a key on the dashboard.

Request body

json
{
  "platform": "discord",
  "platform_user_id": "123456789",
  "guild_id": "987654321",
  "callback_url": "https://your-app.example.com/auth314/callback"
}
FieldTypeRequiredDescription
platformstringYesArbitrary identifier for your integration, e.g. discord, telegram, or your app's own name.
platform_user_idstringYesThe ID you use to identify this user on your end.
guild_idstringNoArbitrary grouping identifier (e.g. a Discord server ID). Defaults to an empty string. Included in the webhook payload as-is.
callback_urlstringYesWhere the result is POSTed. Must be https.

Response — 200 OK

json
{
  "verify_url": "https://app.auth314.com/?session=...",
  "session": "...",
  "expires_at": "2026-07-18T05:00:00.000Z"
}

Redirect or link the end user to verify_url. The session expires 10 minutes after creation (expires_at) and can only be completed once.

Errors

StatusCause
400Missing or invalid platform, platform_user_id, or callback_url (must be a valid https URL)
401Invalid or missing API key
429Rate limit or monthly quota exceeded — see Rate limits and quotas

See Errors for the full response shape.

Not affiliated with Pi Network or the Pi Core Team.