获取应用绑定的三方账号信息
接口描述:
当三方平台内的账号与认证平台内账号不同时,可通过该接口获取用户绑定的三方应用账号
接口地址:
请求方式:
- GET
请求头:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| X-App-Id | 客户端 clientId | header | true | string |
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| accessToken | 接口访问凭证 | query | true | string | |
| userId | 统一身份认证平台用户Id | query | true | long |
响应状态
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | ApiRestResponse«List«AppAccountVO»» |
其他状态码参见:全局状态码
响应示例:
正确时返回:
{
"code": 200,
"status": "success",
"message": "请求成功",
"data": {
"thirdAccount": "",
"thirdUserId": 0,
"thirdUserName": ""
}
}错误时返回:
{
"code": 500,
"data": {},
"message": "成功或异常消息",
"status": "fail"
}响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 成功或异常编码 | integer(int32) | integer(int32) |
| data | 成功或异常数据 | array | AppVO |
| message | 成功或异常消息 | string | |
| status | 旧接口成功、失败或异常辅助判断标记:success、fail、error,可用值:success,fail,error | string |
Schema 属性:
AppAccountVO
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| thirdUserId | 该应用下绑定的三方用户Id | string | |
| thirdAccount | 该应用下绑定的三方账号 | string | |
| thirdUserName | 该应用下绑定的三方用户名称 | string |
调用示例:
NodeJs - Axios:
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api_server_url/app/account?accessToken=AT-3-ewOumlQeTN7TmVufJxq-Ph1fNVnqUTeW&userId=1542135022016057346&userId=111',
headers: {
'X-App-Id': '1'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Java - OkHttp 示例:
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api_server_url/app/account?accessToken=AT-3-ewOumlQeTN7TmVufJxq-Ph1fNVnqUTeW&userId=1542135022016057346&userId=111")
.method("GET", body)
.addHeader("X-App-Id", "1")
.build();
Response response = client.newCall(request).execute();作者:杭州天音 创建时间:2022-10-26 14:42
最后编辑:杭州天音 更新时间:2025-10-27 15:45
最后编辑:杭州天音 更新时间:2025-10-27 15:45