Validate a service token
GET
/auth/validate
const url = 'https://apisandbox.puurk.com/auth/validate';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apisandbox.puurk.com/auth/validate \ --header 'Authorization: Bearer <token>'Validate a Bearer token and return its claims
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Token is valid
Media typeapplication/json
object
valid
Whether the token is valid
boolean
api_client_id
ID of the API client
string
scopes
Scopes granted to this token
Array<object>
object
resource
Resource the scope applies to (e.g. checkout)
string
oid
Organization ID (null for all organizations)
string
public
Marks a publishable (browser) scope. Only honored on a checkout scope bound to one organization, on a client with allowed_origins.
boolean
actions
Permitted actions
Array<string>
key_id
ID of the API key used to generate the token
string
Example
{ "scopes": [ { "actions": [ "read" ] } ]}Token is invalid or expired