POST/v1/tenants/{tenantId}/oauth2/v2.0/token

Create an access token using the tenant-scoped compatibility endpoint

Compatibility endpoint for existing SnowBee integrations. New integrations should use POST /oauth2/token.

Supports application/json and application/x-www-form-urlencoded requests with client_secret_post authentication.

Parameters

tenantIdrequired

Request body (required)

application/x-www-form-urlencoded
client_idrequired

Client ID from your API credentials

Example"your-client-id"
client_secretrequired

Client secret from your API credentials

Example"your-client-secret"
grant_typerequired
Allowed values"client_credentials"
resourceoptional

One assigned eCom store or loyalty program ID for legacy ecom or loyalty_programs. Omit for modern permissions.

scoperequired

Space-separated granted permissions, including Core scopes, ecom:read, ecom:write, loyalty_programs:read and demand_planning. Legacy ecom and loyalty_programs must be requested alone with resource.

Example"ecom:read ecom:write loyalty_programs:read"
application/json
client_idrequired

Client ID from your API credentials

Example"your-client-id"
client_secretrequired

Client secret from your API credentials

Example"your-client-secret"
grant_typerequired
Allowed values"client_credentials"
resourceoptional

One assigned eCom store or loyalty program ID for legacy ecom or loyalty_programs. Omit for modern permissions.

scoperequired

Space-separated granted permissions, including Core scopes, ecom:read, ecom:write, loyalty_programs:read and demand_planning. Legacy ecom and loyalty_programs must be requested alone with resource.

Example"ecom:read ecom:write loyalty_programs:read"

Responses

200Response
application/json
access_tokenrequired

JWT access token to use for API requests

Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
expires_inrequired

Token expiration time in seconds

  • Format: int32
Example3600
scoperequired

Scope granted to the access token

Example"ecom"
token_typerequired
Allowed values"deleted"
400Invalid OAuth token request

Invalid OAuth token request

application/json
errorrequired

OAuth 2.0 error code

Example"invalid_request"
error_descriptionrequired

Human-readable error description

Example"The tenant_id parameter is required"
resolutionrequired

Suggested next action

Example"Add tenant_id to the form-encoded request and retry"
401Client authentication failed

Client authentication failed

application/json
errorrequired

OAuth 2.0 error code

Example"invalid_request"
error_descriptionrequired

Human-readable error description

Example"The tenant_id parameter is required"
resolutionrequired

Suggested next action

Example"Add tenant_id to the form-encoded request and retry"