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-urlencodedclient_idrequiredClient ID from your API credentials
Example"your-client-id"client_secretrequiredClient secret from your API credentials
Example"your-client-secret"grant_typerequired- Allowed values
"client_credentials" resourceoptionalOne assigned eCom store or loyalty program ID for legacy ecom or loyalty_programs. Omit for modern permissions.
scoperequiredSpace-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/jsonclient_idrequiredClient ID from your API credentials
Example"your-client-id"client_secretrequiredClient secret from your API credentials
Example"your-client-secret"grant_typerequired- Allowed values
"client_credentials" resourceoptionalOne assigned eCom store or loyalty program ID for legacy ecom or loyalty_programs. Omit for modern permissions.
scoperequiredSpace-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
application/jsonaccess_tokenrequiredJWT access token to use for API requests
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."expires_inrequiredToken expiration time in seconds
- Format: int32
Example3600scoperequiredScope granted to the access token
Example"ecom"token_typerequired- Allowed values
"deleted"
400Invalid OAuth token request
Invalid OAuth token request
application/jsonerrorrequiredOAuth 2.0 error code
Example"invalid_request"error_descriptionrequiredHuman-readable error description
Example"The tenant_id parameter is required"resolutionrequiredSuggested next action
Example"Add tenant_id to the form-encoded request and retry"
401Client authentication failed
Client authentication failed
application/jsonerrorrequiredOAuth 2.0 error code
Example"invalid_request"error_descriptionrequiredHuman-readable error description
Example"The tenant_id parameter is required"resolutionrequiredSuggested next action
Example"Add tenant_id to the form-encoded request and retry"