Skip to content

浏览 ​

上报当前账号对一个视频号作品的浏览。

接口地址: POST /finderBrowse

说明与注意 ​

  • id、objectNonceId、sessionBuffer 来自视频号主页、搜索或详情类接口的返回;sessionBuffer 和作品绑定,不能跨作品复用。
  • myUserName、myRoleType 从获取个人主页的返回里取。

请求参数 ​

参数名必选类型说明
wId是string登录实例标识
id是number视频号作品 ID。字段名就是 id,不是 objectId
objectNonceId是string视频号作品 nonceId
sessionBuffer是string作品上下文会话数据
myUserName是string自己的视频号用户编码
myRoleType是int自己的视频号角色类型

请求示例 ​

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

{
  "wId": "{{wId}}",
  "id": 14200825020179157073,
  "objectNonceId": "1614432821379421505_0_0_2_2_0",
  "sessionBuffer": "eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...",
  "myUserName": "v2_060000231003b20faec8cae18a1ec5d0cb07eab077ba915250774edbea38082ea6b24af229@finder",
  "myRoleType": 3
}
bash
curl -X POST '{BASE_URL}/finderBrowse' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "wId": "{{wId}}",
  "id": 14200825020179157073,
  "objectNonceId": "1614432821379421505_0_0_2_2_0",
  "sessionBuffer": "eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...",
  "myUserName": "v2_060000231003b20faec8cae18a1ec5d0cb07eab077ba915250774edbea38082ea6b24af229@finder",
  "myRoleType": 3
}'
python
import requests

url = "{BASE_URL}/finderBrowse"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "wId": "{{wId}}",
  "id": 14200825020179157073,
  "objectNonceId": "1614432821379421505_0_0_2_2_0",
  "sessionBuffer": "eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...",
  "myUserName": "v2_060000231003b20faec8cae18a1ec5d0cb07eab077ba915250774edbea38082ea6b24af229@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}/finderBrowse";
String body = "{\n" +
    "  \"wId\": \"{{wId}}\",\n" +
    "  \"id\": 14200825020179157073,\n" +
    "  \"objectNonceId\": \"1614432821379421505_0_0_2_2_0\",\n" +
    "  \"sessionBuffer\": \"eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...\",\n" +
    "  \"myUserName\": \"v2_060000231003b20faec8cae18a1ec5d0cb07eab077ba915250774edbea38082ea6b24af229@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}/finderBrowse';
$body = <<<'JSON'
{
  "wId": "{{wId}}",
  "id": 14200825020179157073,
  "objectNonceId": "1614432821379421505_0_0_2_2_0",
  "sessionBuffer": "eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...",
  "myUserName": "v2_060000231003b20faec8cae18a1ec5d0cb07eab077ba915250774edbea38082ea6b24af229@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": null
}

错误响应 ​

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

响应参数 ​

参数名类型说明
codestring1000 成功;其他值都是失败,通常是 1001
messagestring反馈信息
dataobject / null浏览成功时通常返回 null