Skip to content
POST/finder/getLikeAndFavListJSONAuthorization 请求头在 API 调试中打开

获取赞和收藏的视频列表 ​

分页获取当前视频号点过红心、点过赞或收藏的视频,flag 选类型。

接口地址: POST /finder/getLikeAndFavList

说明与注意 ​

请求参数 ​

参数名必选类型说明
wId是string登录实例标识
lastBuffer否string分页参数;首次传空,翻页时传响应中的 lastBuffer
myUsername是string自己的视频号用户编码。注意是 myUsername(n 小写),见自己账号的字段名
myRoleType是int自己的视频号角色类型
flag是int视频类型:7 全部,1 红心,2 大拇指,4 收藏

请求示例 ​

http
POST {BASE_URL}/finder/getLikeAndFavList
Authorization: Bearer <你的调用凭证>
Content-Type: application/json

{
  "wId": "{{wId}}",
  "lastBuffer": "",
  "myUsername": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
  "myRoleType": 3,
  "flag": 7
}
bash
curl -X POST '{BASE_URL}/finder/getLikeAndFavList' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "wId": "{{wId}}",
  "lastBuffer": "",
  "myUsername": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
  "myRoleType": 3,
  "flag": 7
}'
python
import requests

url = "{BASE_URL}/finder/getLikeAndFavList"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "wId": "{{wId}}",
  "lastBuffer": "",
  "myUsername": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
  "myRoleType": 3,
  "flag": 7
}"""

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/getLikeAndFavList";
String body = "{\n" +
    "  \"wId\": \"{{wId}}\",\n" +
    "  \"lastBuffer\": \"\",\n" +
    "  \"myUsername\": \"v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder\",\n" +
    "  \"myRoleType\": 3,\n" +
    "  \"flag\": 7\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/getLikeAndFavList';
$body = <<<'JSON'
{
  "wId": "{{wId}}",
  "lastBuffer": "",
  "myUsername": "v2_060000231003b20faec8cae18cb07ea33b077ba915250774edbea38082ea6b24af229@finder",
  "myRoleType": 3,
  "flag": 7
}
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": "Jiangsu",
          "city": "Nanjing",
          "sex": 1
        },
        "followTime": 1718847509,
        "nickname": "阿星5679",
        "followFlag": 1,
        "liveStatus": 2,
        "username": "v2_060000231003b20faec8c7ea8f1ecbd1c901ef3cb0773696efb506324185fdd53ba44426a8a7@finder",
        "status": 0
      }
    ],
    "lastBuffer": "CK23AhAA",
    "followCount": 2,
    "continueFlag": 0
  }
}

错误响应 ​

json
{
  "code": "1001",
  "message": "失败",
  "data": null
}

响应参数 ​

参数名类型说明
codestring1000 成功;其他值都是失败,通常是 1001
messagestring反馈信息
dataobject列表结果
data.contactListarray视频号用户或内容列表,按接口实际返回为准
data.contactList[].usernamestring视频号用户编码
data.contactList[].nicknamestring昵称
data.contactList[].headUrlstring头像地址
data.contactList[].signaturestring简介
data.contactList[].authInfoobject认证信息
data.contactList[].extInfoobject地区、性别等扩展信息
data.contactList[].followTimenumber相关时间,Unix 秒级时间戳
data.contactList[].followFlagint关注状态
data.contactList[].liveStatusint直播状态
data.lastBufferstring下一页分页参数
data.followCountnumber当前返回数量或相关计数
data.continueFlagint是否还有下一页:1 有,0 无