PATCH/api/v1/dev/apps/:appId更新应用
Try it 面板需要启用 JavaScript。
更新应用名称、主页与回调地址;scope 变更经 scopes-apply 单独申请。
Request
| Name | Data Type | Required | Description |
| Authorization | string | Yes | 会话令牌认证,格式 `Bearer <sessionToken>` |
| Content-Type | string | Yes | 请求体内容类型(默认值 "application/json") |
type RequestHeaders = {
/** 会话令牌认证,格式 `Bearer <sessionToken>` */
Authorization: string
/** 请求体内容类型,默认值 "application/json" */
Content-Type: string
}
{
"Authorization": "Bearer st_7c1f9e05b28d4a63",
"Content-Type": "application/json"
}
URL Parameters
| Name |
Data Type |
Description |
| appId |
string |
应用 ID |
Body
| Name | Data Type | Required | Description |
| name | string | No | 应用名称 |
| homepage | string | No | 应用主页 |
| redirectUris | array | No | 回调地址列表 |
type RequestBody = {
/** 应用名称 */
name?: string
/** 应用主页 */
homepage?: string
/** 回调地址列表 */
redirectUris?: string[]
}
{
"homepage": "https://analytics.xeegam.com/home"
}
Response
Body
| Name | Data Type | Required | Description |
| appId | string | Yes | 应用 ID |
| name | string | Yes | 应用名称 |
| homepage | string | No | 应用主页 |
| redirectUris | array | Yes | 回调地址列表 |
| tokenType | string | Yes | 令牌形态 |
| status | string | Yes | 应用状态 |
| scopes | array | Yes | 已批准的 scope |
| createdAt | string | Yes | 注册时间 |
type ResponseBody = {
/** 应用 ID */
appId: string
/** 应用名称 */
name: string
/** 应用主页 */
homepage?: string
/** 回调地址列表 */
redirectUris: string[]
/** 令牌形态 */
tokenType: string
/** 应用状态 */
status: string
/** 已批准的 scope */
scopes: string[]
/** 注册时间 */
createdAt: string
}
{
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"name": "Xeegam Analytics",
"homepage": "https://analytics.xeegam.com/home",
"redirectUris": [
"https://analytics.xeegam.com/oauth/callback"
],
"tokenType": "jwt",
"status": "approved",
"scopes": [
"user:profile:read",
"orgs:list"
],
"createdAt": "2026-10-01T10:00:00Z"
}
HTTP Code
| HTTP Status |
Meaning |
Notes |
| 200 |
成功 |
返回更新后的应用 |
| 400 |
回调地址无效 |
非 https 或格式不合法 |
| 403 |
应用已封禁 |
封禁应用不可修改 |
Response Code
响应使用统一信封 {id, code, messages, result},其 code 字段:
| code |
Meaning |
Notes |
| 0 |
成功 |
返回更新后的应用 |
| 2701 |
回调地址无效 |
非 https 或格式不合法 |
| 2702 |
应用已封禁 |
封禁应用不可修改 |
Examples
PATCH /api/v1/dev/apps/01JD8SNST2N5U6X1BU9YBHK4C7J
Authorization: Bearer st_7c1f9e05b28d4a63
Content-Type: application/json
{
"homepage": "https://analytics.xeegam.com/home"
}
{
"id": "01JD8SSLBG0B8DWX",
"code": 0,
"messages": [],
"result": {
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"name": "Xeegam Analytics",
"homepage": "https://analytics.xeegam.com/home",
"redirectUris": ["https://analytics.xeegam.com/oauth/callback"],
"tokenType": "jwt",
"status": "approved",
"scopes": ["user:profile:read", "orgs:list"],
"createdAt": "2026-10-01T10:00:00Z"
}
}