Rensei docs
API ReferenceAuthentication

Issue M2M access token (client_credentials)

OAuth 2.0 `client_credentials` grant. The canonical request media type is `application/x-www-form-urlencoded`; `application/json` remains accepted for backward wire compatibility. 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

application/x-www-form-urlencoded
  1. body
grant_type*"client_credentials"
Value in"client_credentials"
client_id*string
client_secret*string

Response Body

Token issued.

application/json
  1. response
access_token*string
token_type*"Bearer"
Value in"Bearer"
expires_in*integer

Seconds until expiry.

Example Request
curl -X POST 'https://app.rensei.ai/api/oauth/token' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'grant_type=client_credentials&client_id=string&client_secret=string'
Example Response
{  "access_token": "string",  "token_type": "Bearer",  "expires_in": 0}