NATSoauth.app.scopes-apply变更应用申请的 scope
Try it 面板需要启用 JavaScript。
整体替换申请列表;变更后回到待审批状态。
Request Payload
消息格式:JSON
| Name | Data Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | 应用 ID |
| scopes | array | Yes | 新的申请 scope 全集 |
type RequestBody = {
/** 应用 ID */
appId: string
/** 新的申请 scope 全集 */
scopes: string[]
}{
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"scopes": [
"user:profile:read",
"orgs:list",
"subscriptions:read"
]
}Response Payload
回复使用统一信封 {id, code, messages, result},其 result:
| Name | Data Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | 应用 ID |
| scopes | array | Yes | 新的申请 scope |
| approvalStatus | string | Yes | 固定为 pending |
type ResponseBody = {
/** 应用 ID */
appId: string
/** 新的申请 scope */
scopes: string[]
/** 固定为 pending */
approvalStatus: string
}{
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"scopes": [
"user:profile:read",
"orgs:list",
"subscriptions:read"
],
"approvalStatus": "pending"
}Response Code
回复使用统一信封 {id, code, messages, result},其 code 字段:
| code | Meaning | Notes |
|---|---|---|
| 0 | 成功 | 变更应用申请的 scope |
| 2704 | scope 无效 |
Examples
{ "appId": "01JD8SNST2N5U6X1BU9YBHK4C7J", "scopes": ["user:profile:read", "orgs:list", "subscriptions:read"] }
{
"id": "01JD8SWOCN2P9QM",
"code": 0,
"messages": [],
"result": {
"appId": "01JD8SNST2N5U6X1BU9YBHK4C7J",
"scopes": ["user:profile:read", "orgs:list", "subscriptions:read"],
"approvalStatus": "pending"
}
}