Add Public Account
Permissions
The Identity Management API is authorized at the application level. Before calling the API, you need to set API permissions for different applications. For details, see API Permissions.
| Permission Code | Description |
|---|---|
| account_all | Read/Write permission for account management APIs |
| all | Read/Write permission for all APIs |
Request Description
Request Headers
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Authorization | Yes | String | Format: Bearer {access_token} |
| Content-Type | Content Type | Yes | String | Fixed value: application/json; charset=utf-8 |
Request Example
json
{
"account_name":"zhangsan",
"name":"zhangs",
"org_code":"",
"password":"",
"disabled":false,
"extension":{}
}Request Parameters
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| account_name | Application account name | Yes | String | Application account name |
| name | Name | No | String | |
| org_code | Application organization code | No | String | |
| password | Password | No | String | |
| disabled | Whether disabled | No | Boolean | |
| extension | Extension attributes | No | Object |
Response Example
Success Example
HTTP/1.1 201 Created
json
{
"account_id": "20220414163425614-2FD6-CA9B208BE"
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": " APP.0001",
"error_msg": "应用不存在"
}Response Parameters
| Parameter Name | Name | Type | Description |
|---|---|---|---|
| account_id | Application account ID | String |
Error Codes
| Status Code | Error Code | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | APP.0001 | 应用不存在 | App does not exist | Please check whether the app exists |
| 400 | APP.ORG.0024 | 应用机构不存在 | The application organization does not exist | Please check whether the application organization exists |