子账户信息查询

  • 子账户信息查询是云通讯平台为开发者提供的子账户查询接口,通过此REST API可以在您创建子账户重复时,查询原有的子账户信息。支持版本{2013-12-26}
REST API: 子账户信息查询

  • 通过HTTPS POST方式提交请求,云通讯平台收到请求后根据子账户名称查询并返回子账户信息。
  • 接口Demo示例可在REST Server Demo中找到,开发者可根据使用的语言下载对应的Demo
1、请求
1.1 请求地址
  • /{SoftVersion}/Accounts/{accountSid}/QuerySubAccountByName
  •                                         
1.2 请求包头

  • 请参阅:Rest 介绍》统一请求包头,使用主账户进行验证
1.3 请求包体
属性类型约束说明
appIdString必选应用Id
friendlyNameString必选子账户名称
1.4 XML请求示例
  • POST /2013-12-26/Accounts/abcdefghijklmnopqrstuvwxyz012345/QuerySubAccountByName?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>
  •   <appId>ff8080813c37da53013c8054f5123456</appId>
  •   <friendlyName>hello@163.com</friendlyName>
  • </SubAccount>
  •                                         
1.5 JSON请求示例
  • POST /2013-12-26/Accounts/abcdefghijklmnopqrstuvwxyz012345/QuerySubAccountByName?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=

  • {'appId':'ff8080813c37da53013c8054f5612345','friendlyName':'用户1'}
  •                                         
2、响应
2.1 响应包体
属性类型约束说明
statusCodeString必选请求状态码,取值000000(成功),可参考Rest 错误代码
subAccountSidString必选子账户Id。由32个英文字母和阿拉伯数字组成的子账户唯一标识符
subTokenString必选子账户的授权令牌。由32个英文字母和阿拉伯数字组成
dateCreatedString必选子账户的创建时间
voipAccountString必选通讯账号。由14位数字组成,用于客户端SDK登录,作为语音通话及IM功能的唯一标识帐号
voipPwdString必选通讯密码。由8位数字和字母组成
2.1 XML响应示例
  • HTTP/1.1 200 OK
  • Content-Length:586

  • <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  • <Response>
  •   <statusCode>000000</statusCode>
  •   <SubAccount>
  •     <subAccountSid>abcdefghijklmnopqrstuvwxyz123456</subAccountSid>
  •     <subToken>666961bb08a14f568d421e6fe57d2d3c</subToken>
  •     <dateCreated>2013-02-01 15:22:46</dateCreated>
  •     <voipAccount>80000123456789</voipAccount>
  •     <voipPwd>xRkazyz3</voipPwd>
  •   </SubAccount>
  • </Response>
  •                                         
2.3 JSON响应示例
  • HTTP/1.1 200 OK
  • Content-Length:586

  • {"statusCode":"000000","SubAccount":{"subAccountSid":"abcdefghijklmnopqrstuvwxyz123456","subToken":"666961bb08a14f568d42176fe571234","dateCreated":"2013-09-27 11:42:24","voipAccount":"80000123456789","voipPwd":" xRkazyz3"}}