Request method: POST
plaintext
Service URL/v3/device/account/query
API service URLs correspond to service access points one to one. Please select the service URL corresponding to the service access point of your application.
Feature: this API is used to query the binding relationships between accounts and tokens.
Parameter | Type | Required | Description |
---|---|---|---|
operator_type | Integer | Yes | Operation type:1 : Batch query tokens by account2 : Query accounts by token |
account_list | Array | No | Account list. This parameter is valid and required when operator_type is 1 . Each element of the list contains one set of accounts. Example: [{"account":"account1"},{"account":"account2"}] |
token_list | Array | No | Token list. This parameter is valid and required when operator_type is 2 . |
Parameter | Type | Description |
---|---|---|
retCode | Integer | Error code. For more information, please see Server-Side Error Codes. |
errMsg | String | Error message |
account_tokens | Array | Array of mappings from accounts to tokens. Example:[{"account":"account1","token_list":["token1","token2"]}{"account":"account2","token_list":["token2","token3"]} ] |
token_accounts | Array | Array of mappings from tokens to accounts. Example:[{"token":"token1","account_list":[{"account":"926@126.com"},{"account":"1527000000",}]}, {"token":"token2","account_list":[{"account":"926@163.com"},{"account":"1527000001"}]}] |
json
{
"operator_type": 1,
"account_list": [
{
"account": "account1"
},
{
"account": "account2"
}
]
}
json
{
"operator_type": 2,
"token_list": [
"token1",
"token2"
]
}
json
{
"retCode": 0,
"errMsg": "ok",
"result": [
"0",
"0"
],
"account_tokens": [
{
"account": "account1",
"token_list": [
"token1",
"token2"
]
},
{
"account": "account2",
"token_list": [
"token2",
"token3"
]
}
]
}
json
{
"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"
}
]
}
]
}
Was this page helpful?