POST /v1/authorizations/token
Obtains access tokens for server-to-server API calls using the OAuth 2.0 Client Credentials grant type.
Use this interface to:
- obtain an access token before calling protected APIs
- request a new access token after the previous one expires
- renew an access token proactively before it expires
Client Credentials Model
The Client Credentials grant applies when your system calls Rebell APIs on its own behalf, not on behalf of a specific end user. The access token represents your client application, and the granted scopes belong to the application rather than to any individual user. Rebell authenticates and authorizes the calling system as a whole; the token carries no end-user identity. This grant is suited to server-to-server interactions, system-level operations, and scenarios where your application is trusted to act as the direct API consumer.Required Headers
SHA256withRSA algorithm signature:
algorithm=SHA256withRSA, keyVersion=1, signature=****Client identifier provided by Rebell (e.g.,
2022091495540562874792). Must be the same value as the client_id used in the Authorization header.Request Parameters
Authorization Header Encoding
TheAuthorization header uses standard Base64 (not the URL-encoded form used for signatures) of the string client_id:client_secret:
Response Parameters
Result Codes
Result Handling
result.resultCode = SUCCESS: the request succeeded. UseaccessTokenas a Bearer token in subsequent protected API calls.result.resultCode != SUCCESS: the request failed. Decide the next action from the result code and message:- Parameter errors (
PARAM_ILLEGAL,UNSUPPORTED_GRANT_TYPE,INVALID_SCOPE): correct the request and try again. - Authentication errors (
INVALID_AUTH_CLIENT,ACCESS_DENIED): checkclient_id,client_secretand the header format. - System or unknown errors (
UNKNOWN_EXCEPTION): retry later if appropriate.
- Parameter errors (
- Track
expiresInand request a new access token before the current one expires.