NATSoauth.app.update更新应用
Try it 面板需要启用 JavaScript。
更新名称、主页与回调地址;scope 变更经 app.scopes-apply。
Request Payload
消息格式:JSON
| Name | Data Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | 应用 ID |
| name | string | No | 应用名称 |
| homepage | string | No | 应用主页 |
| redirectUris | array | No | 回调地址列表 |
type RequestBody = {
/** 应用 ID */
appId: string
/** 应用名称 */
name?: string
/** 应用主页 */
homepage?: string
/** 回调地址列表 */
redirectUris?: string[]
}{
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"homepage": "https://analytics.xeegam.com/home"
}Response Payload
回复使用统一信封 {id, code, messages, result},其 result:
| Name | Data Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | 应用 ID |
| ownerId | string | Yes | 注册人用户 ID |
| name | string | Yes | 应用名称 |
| homepage | string | No | 应用主页 |
| clientId | string | Yes | 客户端标识 |
| redirectUris | array | Yes | 回调地址列表 |
| tokenType | string | Yes | jwt / opaque |
| status | string | Yes | pending / approved / banned |
| scopes | array | Yes | 已批准的 scope |
| createdAt | string | Yes | 注册时间 |
type ResponseBody = {
/** 应用 ID */
appId: string
/** 注册人用户 ID */
ownerId: string
/** 应用名称 */
name: string
/** 应用主页 */
homepage?: string
/** 客户端标识 */
clientId: string
/** 回调地址列表 */
redirectUris: unknown[]
/** jwt / opaque */
tokenType: string
/** pending / approved / banned */
status: string
/** 已批准的 scope */
scopes: unknown[]
/** 注册时间 */
createdAt: string
}{
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"ownerId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
"name": "Xeegam Analytics",
"homepage": "https://analytics.xeegam.com/home",
"clientId": "cli_9f2ka81mdx",
"redirectUris": [
"https://analytics.xeegam.com/oauth/callback"
],
"tokenType": "jwt",
"status": "approved",
"scopes": [
"user:profile:read",
"orgs:list"
],
"createdAt": "2026-10-01T10:00:00Z"
}Response Code
回复使用统一信封 {id, code, messages, result},其 code 字段:
| code | Meaning | Notes |
|---|---|---|
| 0 | 成功 | 更新应用 |
| 2701 | 回调地址无效 | |
| 2702 | 应用已封禁 |
Examples
{ "appId": "01JD8SNST2N5U6X1BU9YBHK4C7J", "homepage": "https://analytics.xeegam.com/home" }
{
"id": "01JD8SWLZK9M6NJ",
"code": 0,
"messages": [],
"result": {
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"ownerId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
"name": "Xeegam Analytics",
"homepage": "https://analytics.xeegam.com/home",
"clientId": "cli_9f2ka81mdx",
"redirectUris": ["https://analytics.xeegam.com/oauth/callback"],
"tokenType": "jwt",
"status": "approved",
"scopes": ["user:profile:read", "orgs:list"],
"createdAt": "2026-10-01T10:00:00Z"
}
}