Console
Auth — SSO

Check SSO Token

Checks the status of an SSO token created by sso_create. Poll this endpoint until the status is active (authorized) or expired. When active, the response includes the user's account data and a standard session token.

POST /api/vaneltonid/sso_check.php
Requires Authorization: AppID:AppKey header — WebKey not accepted

Request body

FieldTypeRequiredDescription
sso_tokenstringrequiredThe token returned by sso_create.php

Responses

{
  "status": "active",
  "user": {
    "id": 42,
    "userKey": "abc123...",
    "username": "vanelton",
    "name": "Vanelton",
    "email": "usuario@email.com",
    "profileimg": "https://cdn.vaneltonmedia.com/...",
    "idverify": 1,
    "coins": 150,
    "vip_plan": "gold",
    "vip_signed": "2025-01-10 12:00:00",
    "vip_end": "2026-01-10 12:00:00",
    "token": "SESSION_TOKEN_64_CHARS"
  }
}
{ "status": "pending" }
{ "status": "expired" }

Status codes

StatusMeaningAction
pendingUser has not yet authorizedWait 3 seconds and poll again
activeUser authorized — session token availableSave user.token and proceed
expired10 minutes elapsed without authorizationCreate a new SSO token via sso_create
session_expiredToken was authorized but session is older than 6 daysCreate a new SSO token

User object fields

FieldTypeDescription
idintNumeric account ID
userKeystringUnique user identifier string
usernamestringDisplay name
namestringFull name
emailstringAccount email
profileimgstringAvatar URL
idverifyint1 if account is verified
coinsintVanelton Coins balance
vip_planstringActive VIP plan name (or null)
tokenstringSession token — use in Authorization header or JSON body for all user-scoped API calls. Identical to a token from login.php.

Errors

CodeCause
401Invalid AppID:AppKey credentials
400sso_token missing or not recognized