Appearance
获取关注列表
分页获取当前视频号的关注列表。
接口地址: POST /finder/getFollowList
说明与注意
myUserName、myRoleType从获取个人主页的返回里取。- 请求参数叫
lastBuff,响应里叫lastBuffer,翻页时把lastBuffer的值传给lastBuff。
请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| wId | 是 | string | 登录实例标识 |
| lastBuff | 否 | string | 分页参数;首次传空,翻页时传响应中的 lastBuffer |
| myUserName | 是 | string | 自己的视频号用户编码 |
| myRoleType | 是 | int | 自己的视频号角色类型 |
请求示例
http
POST {BASE_URL}/finder/getFollowList
Authorization: Bearer <你的调用凭证>
Content-Type: application/json
{
"wId": "{{wId}}",
"lastBuff": "",
"myUserName": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
"myRoleType": 3
}bash
curl -X POST '{BASE_URL}/finder/getFollowList' \
-H 'Authorization: Bearer <你的调用凭证>' \
-H 'Content-Type: application/json' \
--data-raw '{
"wId": "{{wId}}",
"lastBuff": "",
"myUserName": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
"myRoleType": 3
}'python
import requests
url = "{BASE_URL}/finder/getFollowList"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
"wId": "{{wId}}",
"lastBuff": "",
"myUserName": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
"myRoleType": 3
}"""
resp = requests.post(url, headers=headers, data=body.encode("utf-8"))
print(resp.text)java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
String url = "{BASE_URL}/finder/getFollowList";
String body = "{\n" +
" \"wId\": \"{{wId}}\",\n" +
" \"lastBuff\": \"\",\n" +
" \"myUserName\": \"v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder\",\n" +
" \"myRoleType\": 3\n" +
"}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create(url))
.header("Authorization", "Bearer <你的调用凭证>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());php
<?php
$url = '{BASE_URL}/finder/getFollowList';
$body = <<<'JSON'
{
"wId": "{{wId}}",
"lastBuff": "",
"myUserName": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
"myRoleType": 3
}
JSON;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer <你的调用凭证>',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;成功响应
json
{
"code": "1000",
"message": "获取关注列表成功",
"data": {
"contactList": [
{
"signature": "。。。",
"headUrl": "https://wx.qlogo.cn/finderhead/ver_1/example/0",
"authInfo": {},
"extInfo": {
"country": "CN",
"province": "",
"city": "",
"sex": 2
},
"followTime": 1718847606,
"nickname": "朝vvvv",
"followFlag": 1,
"liveStatus": 2,
"username": "v2_060000231003b20faec8c6e18f10c7d6c903ec776955d3d97c6b329d6aa58693bcdb7ad1@finder",
"status": 0
}
],
"lastBuffer": "CL+fAxu8+qqBg==",
"followCount": 1,
"continueFlag": 1
}
}错误响应
json
{
"code": "1001",
"message": "失败",
"data": null
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 1000 成功;其他值都是失败,通常是 1001 |
| message | string | 反馈信息 |
| data | object | 关注列表结果 |
| data.contactList | array | 关注用户列表 |
| data.contactList[].username | string | 视频号用户编码 |
| data.contactList[].nickname | string | 昵称 |
| data.contactList[].headUrl | string | 头像地址 |
| data.contactList[].signature | string | 简介 |
| data.contactList[].authInfo | object | 认证信息 |
| data.contactList[].extInfo | object | 地区、性别等扩展信息 |
| data.contactList[].followTime | number | 关注时间,Unix 秒级时间戳 |
| data.contactList[].followFlag | int | 关注状态 |
| data.contactList[].liveStatus | int | 直播状态 |
| data.lastBuffer | string | 下一页分页参数 |
| data.followCount | number | 关注数量 |
| data.continueFlag | int | 是否还有下一页:1 有,0 无 |