Search Documentation

Search API endpoints, webhooks, tools, and guides

On this page6 sections
Is this helpful?
Quick Actions
Download OpenAPI.json
POST/api/integrations/create-oauth-clientIntegrationsPermission: integrations.create

Create OAuth2 Client

Registers a new OAuth2 `client_credentials` application with scoped permissions, custom rate limit, and token TTL.

Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).

Request

Provide the following fields in the request payload.

Body application/json
namestringrequired

name parameter.

scopesarray<enum('invoice.create' | 'invoice.view' | 'invoice.delete' | 'outlet.view', ...)>optionaldefault: invoice.create,invoice.view,outlet.view,product.view

scopes parameter.

rateLimitPerMinintegeroptionaldefault: 240

rate Limit Per Min parameter.

tokenTtlSecondsintegeroptionaldefault: 3600

token Ttl Seconds parameter.

Responses

Select a status code to inspect schema.

OK — OAuth2 client created (client secret shown once).application/json
successenum('true')

Success (true).

messagestring

Message.

dataobject | null

Response payload or null.

POST/api/integrations/create-oauth-client
curl -X POST "https://api.invoger.com/api/integrations/create-oauth-client" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{ "name": "ERP Sync Worker", "scopes": [ "invoice.view", "product.view" ], "rateLimitPerMin": 240, "tokenTtlSeconds": 3600 }'
Interactive playground

Response

application/json
{
  "success": true,
  "message": "OAuth2 client created successfully",
  "data": {
    "id": "c1a2b3c4",
    "clientId": "inv_client_998123",
    "clientSecret": "inv_secret_..."
  }
}