Rensei docs
API ReferenceAuthentication

Issue M2M access token (client_credentials)

OAuth 2.0 `client_credentials` grant. Accepts both `application/x-www-form-urlencoded` and `application/json` bodies. Returns a short-lived `Bearer` access token. M2M clients are provisioned in the admin panel (`POST /api/admin/m2m-clients`).

POST
/api/oauth/token

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/oauth/token" \  -H "Content-Type: application/json" \  -d '{    "grant_type": "client_credentials",    "client_id": "string",    "client_secret": "string"  }'
{
  "access_token": "string",
  "token_type": "Bearer",
  "expires_in": 0
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}