Skip to content

Issue a service token

POST
/auth/token
curl --request POST \
--url https://apisandbox.puurk.com/auth/token \
--header 'Content-Type: application/json' \
--data '{ "client_id": "example", "client_secret": "example" }'

Exchange API client credentials for a short-lived Bearer JWT (1 hour). Provide credentials via Basic Auth header or JSON body.

API client credentials

Media typeapplication/json
object
client_id
required

API client ID

string
client_secret
required

API client secret

string
Examplegenerated
{
"client_id": "example",
"client_secret": "example"
}

Token issued successfully

Media typeapplication/json
object
access_token

JWT Bearer token

string
token_type

Token type (always Bearer)

string
expires_in

Token lifetime in seconds

integer
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
nullable
actions

Permitted actions

Array<string>
Allowed values: read write delete admin
Example
{
"token_type": "Bearer",
"expires_in": 3600,
"scopes": [
{
"actions": [
"read"
]
}
]
}

Invalid credentials

Media typeapplication/json
object
error

Error code

string
Allowed values: invalid_client rate_limit_exceeded server_error
message

Human-readable error message

string
Example
{
"error": "invalid_client"
}

Rate limit exceeded

Media typeapplication/json
object
error

Error code

string
Allowed values: invalid_client rate_limit_exceeded server_error
message

Human-readable error message

string
Example
{
"error": "invalid_client"
}