POST/oauth2/token
Create an access token
Canonical OAuth 2.0 client credentials token endpoint.
Send tenant_id, grant_type, and space-separated scope permissions as an application/x-www-form-urlencoded body. Modern tokens include all assigned stores and programs for the requested API families; omit resource. Legacy ecom and loyalty_programs requests require one resource ID. Authenticate the API client with HTTP Basic (recommended) or client_id and client_secret in the body.
MCP clients use the authorization_code (PKCE) and refresh_token grants as form posts.
Request body (required)
application/x-www-form-urlencodedclient_idoptionalClient ID when using client_secret_post. Omit when using HTTP Basic.
client_secretoptionalClient secret when using client_secret_post. Omit when using HTTP Basic.
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"tenant_idrequiredSnowBee tenant ID
Example"019c1234-5678-7abc-8def-123456789012"
application/jsonclient_idoptionalClient ID when using client_secret_post. Omit when using HTTP Basic.
client_secretoptionalClient secret when using client_secret_post. Omit when using HTTP Basic.
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"tenant_idrequiredSnowBee tenant ID
Example"019c1234-5678-7abc-8def-123456789012"
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"