关闭子账户
- 如果开发者要在云平台关闭子帐户,只需将向关闭子账户的URL提交子账户Id。当关闭子帐户后,该子帐户不能拨打和接听电话,或者发送和接收短信,且账户验证将无法通过。请注意你必须通过主帐户的身份验证后才可以关闭子帐户。
REST API: 关闭子账户
- 通过HTTPS POST方式提交请求,云通讯平台收到请求后,返回关闭子账户的结果。
1、请求
1.1 请求地址
- /{SoftVersion}/Accounts/{accountSid}/CloseSubAccount
1.2 请求包头
- 请参阅:Rest 介绍》统一请求包头,使用主账户进行验证
1.3 请求包体
属性 | 类型 | 约束 | 说明 |
subAccountSid | String | 必选 | 子账户Id |
1.4 XML请求示例
- POST /2013-12-26/Accounts/abcdefghijklmnopqrstuvwxyz012345/CloseSubAccount?sig=155EAA68C5DFB6B762A42D88F406ABCD
- HTTP/1.1
- Host:192.168.0.1:8883
- content-length: 139
- Accept:application/xml;
- Content-Type:application/xml;
- charset=utf-8;
- Authorization:ZmY4MDgwODEzYzM3ZGE1MzAxM2M4MDRmODA3MjAwN2M6MjAxMzAyMDExNTABCDE=
- <?xml version='1.0' encoding='utf-8'?>
- <SubAccount>
- <subAccountSid>ff8080813c37da53013c8054f567007e</subAccountSid>
- </SubAccount>
1.5 JSON请求示例
- POST /2013-12-26/Accounts/abcdefghijklmnopqrstuvwxyz012345/CloseSubAccount?sig=155EAA68C5DFB6B762A42D88F406ABCD
- HTTP/1.1
- Host:192.168.0.1:8883
- content-length: 139
- Accept:application/json;
- Content-Type:application/json;
- charset=utf-8;
- Authorization:ZmY4MDgwODEzYzM3ZGE1MzAxM2M4MDRmODA3MjAwN2M6MjAxMzAyMDExNTABCDE=
- {"subAccountSid":"ff8080813c37da53013c8054f567007e"}
2、响应
2.1 响应包体
属性 | 类型 | 约束 | 说明 |
statusCode | String | 必选 | 请求状态码,取值000000(成功),可参考Rest 错误代码。 |
2.1 XML响应示例
- HTTP/1.1 200 OK
- Content-Length:586
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <Response>
- <statusCode>000000</statusCode>
- </Response>
2.3 JSON响应示例
- HTTP/1.1 200 OK
- Content-Length:586
- {"statusCode":"000000"}