当前位置:主页 > 查看内容

移动推送 TPNS 账号设备绑定查询 - API 文档

发布时间:2021-10-20 00:00| 位朋友查看

简介:接口说明 请求方式 :POST。 服务地址/v3/device/account/query 接口服务地址与服务接入点一一对应,请选择与您的应用服务接入点对应的 服务地址。 接口功能 :查询 Account 与 Token 的绑定关系。 参数说明 请求参数 参数名 类型 是否必需 参数说明 operato……

接口说明

请求方式:POST。

服务地址/v3/device/account/query

接口服务地址与服务接入点一一对应,请选择与您的应用服务接入点对应的 服务地址。

接口功能:查询 Account 与 Token 的绑定关系。

参数说明

请求参数

参数名 类型 是否必需 参数说明
operator_type Integer 操作类型:
  • 1:根据 Account 批量查询对应 Token
  • 2:根据 Token 查询 Account
  • account_list Array 当 operator_type = 1 时有效且必填,待查询 Account 列表每个元素含一组 Account 。 具体示例如下:[{"account":"account1"},{"account":"account2"}]
    token_list Array 当 operator_type = 2 时有效且必填待查询 Token 的列表

    响应参数

    参数名 类型 参数说明
    retCode Integer 错误码,详细参照 错误码对照表
    errMsg String 错误信息
    account_tokens Array Account 到 Token 的映射关系数组。示例如下:
    [{"account":"account1","token_list":["token1","token2"]}{"account":"account2","token_list":["token2","token3"]}]
    token_accounts Array Token 到 Account 的映射关系数组。示例如下:
    [{"token":"token1","account_list":[{"account":"926@126.com"},{"account":"1527000000",}]},
    {"token":"token2","account_list":[{"account":"926@163.com"},{"account":"1527000001"}]}]

    示例说明

    请求示例

    • 批量查询 Account 绑定的 Token 关系

      {
       "operator_type": 1,
       "account_list": [
           {
               "account": "account1"
           },
           {
               "account": "account2"
           }
       ]
      }
    • 批量查询 Token 绑定的 Account 关系

      {
       "operator_type": 2,
       "token_list": [
           "token1",
           "token2"
       ]
      }

    返回示例

    • 批量查询 Account 绑定的 Token

      {
       "retCode": 0,
       "errMsg": "ok",
       "result": [
           "0",
           "0"
       ],
       "account_tokens": [
           {
               "account": "account1",
               "token_list": [
                   "token1",
                   "token2"
               ]
           },
           {
               "account": "account2",
               "token_list": [
                   "token2",
                   "token3"
               ]
           }
       ]
      }
    • 批量查询 Token 绑定的 Account

      {
       "retCode": 0,
       "errMsg": "ok",
       "result": [
           "0",
           "0"
       ],
       "token_accounts": [
           {
               "token": "token1",
               "account_list": [
                   {
                       "account": "926@126.com"
                   },
                   {
                       "account": "1527000000"
                   }
               ]
           },
           {
               "token": "token2",
               "account_list": [
                   {
                       "account": "926@163.com"
                   },
                   {
                       "account": "1527000001"
                   }
               ]
           }
       ]
      }

    本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!
    上一篇:管理标签 - 文件存储 NAS 下一篇:没有了

    推荐图文

    • 周排行
    • 月排行
    • 总排行

    随机推荐