Validar token de SSO
GET
/api/seller/external/v1/sso/validate
curl --request GET \ --get "https://api.spelt.com.br/api/seller/external/v1/sso/validate?token=Xk9..." \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/sso/validate");
const params = { "token": "Xk9...",};Object.keys(params) .forEach(key => url.searchParams.append(key, params[key]));
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
fetch(url, { method: "GET", headers,}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/sso/validate';$response = $client->get( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'query' => [ 'token' => 'Xk9...', ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/sso/validate'params = { 'token': 'Xk9...',}headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('GET', url, headers=headers, params=params)response.json()Valida e consome o token que o Spelt pôs em ?spelt_token= ao mandar o cliente para a sua aplicação, e
devolve o payload do acesso (conta, membro, assinaturas e seller_id, a conta que emitiu). Só aceita token
emitido pela sua conta: token gerado pela Loja de outro Seller responde 404, como token vencido ou já usado, e não
é consumido. Use esta rota no lugar de GET /public/sso/validate, que aceita token de qualquer Seller.
Identifique a pessoa por user.id e a conta por tenant_id. E-mail não é identidade: só ligue um usuário que já
existe na sua base pelo e-mail quando user.email_verified_at vier preenchido.
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Query Parameters
Seção intitulada “Query Parameters”token
required
Valor de spelt_token. Uso único, vale 60 segundos.
string
Valor de spelt_token. Uso único, vale 60 segundos.
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
seller_id
string
tenant_id
string
tenant_name
string
user
object
id
string
email
string
email_verified_at
string
subscriptions
array
expires_at
string
Example
{ "data": { "seller_id": "01KRJ...", "tenant_id": "01KZ...", "tenant_name": "Cliente", "user": { "id": "01KZ...", "email_verified_at": "2026-11-18T10:00:00.000000Z" }, "subscriptions": [], "expires_at": "2026-11-18T10:01:00.000000Z" }}Media typeapplication/json
object
error
string
Example
{ "error": "Token inválido ou expirado."}