编程访问账号添加
POST
/api/v2/applications/{appId}/programmatic-access-accounts
请求参数
Path 参数
appId
string
APP ID
示例值:
61df925846bed781f5757166
Header 参数
Authorization
string
Token
示例值:
Bearer sdfdsfsdfs
x-authing-userpool-id
string
用户池 ID
示例值:
61b95d6c96d42670da568408
Body 参数application/json
tokenLifetime
integer
必需
remarks
string
说明
示例
{
"tokenLifetime": 0,
"remarks": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://core.authing.cn/api/v2/applications/61df925846bed781f5757166/programmatic-access-accounts' \
--header 'Authorization: Bearer sdfdsfsdfs' \
--header 'x-authing-userpool-id: 61b95d6c96d42670da568408' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenLifetime": 0,
"remarks": "string"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
appId
string
必需
secret
string
必需
remarks
string
必需
tokenLifetime
integer
必需
createdAt
string
必需
updatedAt
string
必需
id
string
必需
userId
null
必需
enabled
boolean
必需
示例
{
"code": 200,
"message": "创建编程访问账号成功",
"data": {
"appId": "61df925846bed781f5757166",
"secret": "fc214eec8351279e48808bdb520ce50e",
"remarks": "this is a remark",
"tokenLifetime": 10,
"createdAt": "2022-01-13T05:31:28.248Z",
"updatedAt": "2022-01-13T05:31:28.248Z",
"id": "61dfb93089e8037f8144016c",
"userId": null,
"enabled": true
}
}
修改于 2022-01-13 05:33:19