Search Documentation

Search API endpoints, webhooks, tools, and guides

On this page6 sections
Is this helpful?
Quick Actions
Download OpenAPI.json
POST/api/integrations/oauth2/tokenIntegrations

Exchange OAuth2 Client Credentials

Issues short-lived scoped OAuth2 access tokens via `client_credentials` grant (`client_id` + `client_secret`). Accepts JSON, `application/x-www-form-urlencoded`, or HTTP Basic Auth. Rate-limited per IP and per client (`Cache-Control: no-store`).

Authentication: Authenticate via client_id + client_secret in request body, form payload, or HTTP Basic Auth.

Request

Provide the following fields in the request payload.

Body application/json
client_idstringrequired

client_id parameter.

client_secretstringrequired

client_secret parameter.

grant_typeenum('client_credentials')optionaldefault: client_credentials

grant_type parameter.

scopestringoptional

scope parameter.

Responses

Select a status code to inspect schema.

OK — Scoped OAuth2 access token issued.application/json
successenum('true')

Success (true).

messagestring

Message.

dataobject | null

Response payload or null.

POST/api/integrations/oauth2/token
curl -X POST "https://api.invoger.com/api/integrations/oauth2/token" \
  -H "Content-Type: application/json" \
  -d '{ "client_id": "inv_client_998123", "client_secret": "inv_secret_••••", "grant_type": "client_credentials", "scope": "invoice.create product.view" }'
Interactive playground

Response

application/json
{
  "success": true,
  "message": "Success",
  "data": {
    "access_token": "eyJhbGciOiJIUzI1NiIs...",
    "token_type": "Bearer",
    "expires_in": 3600,
    "scope": "invoice.create product.view",
    "scopes": [
      "invoice.create",
      "product.view"
    ],
    "client_id": "inv_client_998123"
  }
}