Skip to content

Client Management

Overview

The Client Management API provides endpoints for registering, configuring, and managing secrets for OAuth client applications.

Endpoint List

MethodEndpointDescription
GET/api/admin/clientsList clients
GET/api/admin/clients/:idGet client details
POST/api/admin/clientsCreate client
PUT/api/admin/clients/:idUpdate client
DELETE/api/admin/clients/:idDelete client
POST/api/admin/clients/:id/rotate-secretRotate secret
POST/api/admin/clients/:id/enableEnable client
POST/api/admin/clients/:id/disableDisable client

List Clients

Retrieve a list of registered OAuth clients.

Endpoint

GET /api/admin/clients

Query Parameters

ParameterTypeRequiredDescription
limitinteger-Number of items (default: 20, max: 100)
cursorstring-Pagination cursor
typestring-Client type (web, native, spa, m2m)
statusstring-Status (active, disabled)

Request Example

Terminal window
curl -X GET "https://{tenant-domain}/api/admin/clients?type=web" \
-H "Authorization: Bearer {token}"

Response Example

{
"items": [
{
"id": "client_abc123",
"name": "My Web App",
"type": "web",
"status": "active",
"redirect_uris": ["https://myapp.example.com/callback"],
"created_at": 1705881600,
"updated_at": 1705968000
}
],
"total": 5,
"cursor": null
}

Get Client Details

Retrieve detailed information for a specified client.

Endpoint

GET /api/admin/clients/:id

Path Parameters

ParameterTypeRequiredDescription
idstringClient ID

Request Example

Terminal window
curl -X GET "https://{tenant-domain}/api/admin/clients/client_abc123" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "client_abc123",
"name": "My Web App",
"description": "Main web application",
"type": "web",
"status": "active",
"redirect_uris": [
"https://myapp.example.com/callback",
"https://myapp.example.com/silent-callback"
],
"post_logout_redirect_uris": [
"https://myapp.example.com/"
],
"allowed_origins": [
"https://myapp.example.com"
],
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
"token_endpoint_auth_method": "client_secret_post",
"scopes": ["openid", "profile", "email"],
"id_token_lifetime": 3600,
"access_token_lifetime": 3600,
"refresh_token_lifetime": 2592000,
"created_at": 1705881600,
"updated_at": 1705968000
}

Create Client

Register a new OAuth client.

Endpoint

POST /api/admin/clients

Request Body

FieldTypeRequiredDescription
namestringClient name
typestringClient type (web, native, spa, m2m)
descriptionstring-Description
redirect_urisstring[]Redirect URI list
post_logout_redirect_urisstring[]-Post-logout redirect URIs
allowed_originsstring[]-Allowed origins (CORS)
grant_typesstring[]-Allowed grant types
response_typesstring[]-Allowed response types
token_endpoint_auth_methodstring-Token endpoint auth method
scopesstring[]-Allowed scopes
id_token_lifetimeinteger-ID token lifetime (seconds)
access_token_lifetimeinteger-Access token lifetime (seconds)
refresh_token_lifetimeinteger-Refresh token lifetime (seconds)

Client Types

TypeDescriptionRecommended Auth Method
webServer-side web appclient_secret_post/basic
nativeNative app (iOS, Android)none (PKCE)
spaSingle-page appnone (PKCE)
m2mMachine-to-machineclient_secret_post/basic

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/clients" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "New Web App",
"type": "web",
"description": "New web application",
"redirect_uris": ["https://newapp.example.com/callback"],
"grant_types": ["authorization_code", "refresh_token"],
"scopes": ["openid", "profile", "email"]
}'

Response Example

{
"id": "client_xyz789",
"name": "New Web App",
"type": "web",
"status": "active",
"client_secret": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"redirect_uris": ["https://newapp.example.com/callback"],
"created_at": 1706140800
}

Update Client

Update existing client settings.

Endpoint

PUT /api/admin/clients/:id

Request Example

Terminal window
curl -X PUT "https://{tenant-domain}/api/admin/clients/client_abc123" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Web App",
"redirect_uris": [
"https://myapp.example.com/callback",
"https://myapp.example.com/callback2"
]
}'

Delete Client

Delete a client.

Endpoint

DELETE /api/admin/clients/:id

Request Example

Terminal window
curl -X DELETE "https://{tenant-domain}/api/admin/clients/client_abc123" \
-H "Authorization: Bearer {token}"

Response

Status code 204 No Content (no body)


Rotate Secret

Regenerate the client secret.

Endpoint

POST /api/admin/clients/:id/rotate-secret

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/clients/client_abc123/rotate-secret" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "client_abc123",
"client_secret": "cs_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
"rotated_at": 1706227200
}

Enable Client

Enable a disabled client.

Endpoint

POST /api/admin/clients/:id/enable

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/clients/client_abc123/enable" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "client_abc123",
"status": "active",
"enabled_at": 1706313600
}

Disable Client

Temporarily disable a client. Disabled clients cannot issue tokens.

Endpoint

POST /api/admin/clients/:id/disable

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/clients/client_abc123/disable" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "client_abc123",
"status": "disabled",
"disabled_at": 1706400000
}