For the base URL, authentication and errors, see the REST API overview.
GET /v1/oauth_clients
- Request: GET /v1/oauth_clients
- Operation: ListOauthClients
- Operation ID:
OauthClient_List - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Example request
bash
curl 'https://YOUR_SERVER/v1/oauth_clients' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
Response example (200)
json
[
{
"created": 1792263090752,
"description": "Mobile and web app of Example",
"enabled": true,
"modified": 1792263090752,
"name": "Example App",
"oauth_client": "example_app"
}
]POST /v1/oauth_clients
- Request: POST /v1/oauth_clients
- Operation: CreateOauthClient
- Operation ID:
OauthClient_Create - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Request body (application/json, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | ||
enabled | boolean | no | Disabled clients cannot authorize nor get tokens. | |
name | string | yes | Application name shown on the consent screen. | |
oauth_client | string | yes | Pattern: ^[a-zA-Z0-9-_]{1,32}$ | Client id used by the application in the OAuth2 flows (authorization code, device flow). |
picture | string | no | Logo shown on the consent screen, as a data URL. | |
prompt | string | no | Text of the consent screen. | |
redirect_uri | string | yes | Allowed redirect URIs, one per line (newline separated). The redirect_uri of each request must match one of them exactly (case-insensitive). | |
scope | object | no | Permissions requested for the application, as a permission tree ({"Device": {"*": ["ReadDevice"]}}). Informational: the token scope comes from the authorize request. | |
secret | string | yes | Client secret. Stored as is and returned to admins. |
Example request: Web application
bash
curl -X POST 'https://YOUR_SERVER/v1/oauth_clients' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"description": "Mobile and web app of Example",
"enabled": true,
"name": "Example App",
"oauth_client": "example_app",
"prompt": "Example App wants to read your devices",
"redirect_uri": "https://app.example.com/oauth/callback\nhttp://localhost:4200/oauth/callback",
"scope": {
"Device": {
"*": [
"ListDevices",
"ReadDevice"
]
}
},
"secret": "change-this-long-random-secret"
}'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
GET /v1/oauth_clients/{oauth_client}
- Request: GET /v1/oauth_clients/
- Operation: ReadOauthClientConfig
- Operation ID:
OauthClient_ReadConfig - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
oauth_client | path | string | yes |
Example request
bash
curl 'https://YOUR_SERVER/v1/oauth_clients/YOUR_OAUTH_CLIENT' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
Response example (200, Web application)
json
{
"created": 1792263090752,
"description": "Mobile and web app of Example",
"enabled": true,
"modified": 1792263090752,
"name": "Example App",
"oauth_client": "example_app",
"prompt": "Example App wants to read your devices",
"redirect_uri": "https://app.example.com/oauth/callback\nhttp://localhost:4200/oauth/callback",
"scope": {
"Device": {
"*": [
"ListDevices",
"ReadDevice"
]
}
},
"secret": "change-this-long-random-secret"
}PUT /v1/oauth_clients/{oauth_client}
- Request: PUT /v1/oauth_clients/
- Operation: UpdateOauthClient
- Operation ID:
OauthClient_Update - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
oauth_client | path | string | yes |
Request body (application/json, required)
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
description | string | no | ||
enabled | boolean | no | ||
name | string | no | ||
picture | string | no | ||
prompt | string | no | ||
redirect_uri | string | no | ||
scope | object | no | ||
secret | string | no |
Example request: Full Update
bash
curl -X PUT 'https://YOUR_SERVER/v1/oauth_clients/YOUR_OAUTH_CLIENT' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"description": "Mobile and web app of Example",
"enabled": true,
"name": "Example App",
"oauth_client": "example_app",
"prompt": "Example App wants to read your devices",
"redirect_uri": "https://app.example.com/oauth/callback\nhttp://localhost:4200/oauth/callback",
"scope": {
"Device": {
"*": [
"ListDevices",
"ReadDevice"
]
}
},
"secret": "change-this-long-random-secret"
}'Example body: Update 'description'
json
{
"description": "Mobile and web app of Example"
}Example body: Update 'enabled'
json
{
"enabled": true
}Example body: Update 'name'
json
{
"name": "Example App"
}Example body: Update 'prompt'
json
{
"prompt": "Example App wants to read your devices"
}Example body: Update 'redirect_uri'
json
{
"redirect_uri": "https://app.example.com/oauth/callback\nhttp://localhost:4200/oauth/callback"
}Example body: Update 'scope'
json
{
"scope": {
"Device": {
"*": [
"ListDevices",
"ReadDevice"
]
}
}
}Example body: Update 'secret'
json
{
"secret": "change-this-long-random-secret"
}Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |
DELETE /v1/oauth_clients/{oauth_client}
- Request: DELETE /v1/oauth_clients/
- Operation: DeleteOauthClient
- Operation ID:
OauthClient_Delete - Authentication: access token,
Authorization: Bearer YOUR_TOKEN
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
oauth_client | path | string | yes |
Example request
bash
curl -X DELETE 'https://YOUR_SERVER/v1/oauth_clients/YOUR_OAUTH_CLIENT' \
-H 'Authorization: Bearer YOUR_TOKEN'Responses
| Status | Description |
|---|---|
| 200 | ok |
| 401 | unauthorized |
| 403 | forbidden |