Skip to content

登录视频号助手 ​

用视频号助手的登录二维码确认登录,返回助手会话 sessionId 和可管理的视频号列表。

接口地址: POST /scanFinderHelper

说明与注意 ​

  • url 传视频号助手登录页二维码解析出的 confirm_login 地址,不是页面地址。
  • 二维码地址有时效,过期要重新取再提交。
  • finderList 为空时,先确认这个微信号有没有视频号管理权限。

请求参数 ​

参数名必选类型说明
wId是string登录实例标识
url是string视频号助手二维码解析后的确认登录地址

请求示例 ​

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

{
  "wId": "{{wId}}",
  "url": "https://channels.weixin.qq.com/mobile/confirm_login.html?token=AQAAADuBfwIdyYlrciNBWQ"
}
bash
curl -X POST '{BASE_URL}/scanFinderHelper' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "wId": "{{wId}}",
  "url": "https://channels.weixin.qq.com/mobile/confirm_login.html?token=AQAAADuBfwIdyYlrciNBWQ"
}'
python
import requests

url = "{BASE_URL}/scanFinderHelper"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "wId": "{{wId}}",
  "url": "https://channels.weixin.qq.com/mobile/confirm_login.html?token=AQAAADuBfwIdyYlrciNBWQ"
}"""

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}/scanFinderHelper";
String body = "{\n" +
    "  \"wId\": \"{{wId}}\",\n" +
    "  \"url\": \"https://channels.weixin.qq.com/mobile/confirm_login.html?token=AQAAADuBfwIdyYlrciNBWQ\"\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}/scanFinderHelper';
$body = <<<'JSON'
{
  "wId": "{{wId}}",
  "url": "https://channels.weixin.qq.com/mobile/confirm_login.html?token=AQAAADuBfwIdyYlrciNBWQ"
}
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": {
    "sessionId": "BgAAoFaoS/vANMJKEyZH+Au/nki9zvLCL0es8VRNvfPrAC96a8lTJRzJHPzeUODIw7y/yQPlPGp5C07/D+hsIwjjOSx6q0m",
    "acctStatus": 1,
    "finderList": [
      {
        "finderUsername": "v2_060000231003b20faec8c6e18f10cc903ec3db0776955d3d97c6b329d6aa58693bcdb7ad1@finder",
        "nickname": "vvvv",
        "headImgUrl": "https://wx.qlogo.cn/finderhead/Q3auHgzwqOsJtnHiaiapZ4cv43GNBJkH0guXYeulzge7e7IQwHg/0",
        "coverImgUrl": "",
        "spamFlag": 0,
        "acctType": 1,
        "authIconType": 0,
        "ownerWxUin": 2207814660,
        "adminNickname": "hhh。",
        "categoryFlag": "0",
        "uniqId": "sphZ1RF6CMuZAn",
        "isMasterFinder": true
      }
    ]
  }
}

错误响应 ​

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

响应参数 ​

参数名类型说明
codestring1000 成功;其他值都是失败,通常是 1001
messagestring反馈信息
dataobject视频号助手登录结果
data.sessionIdstring视频号助手会话 ID
data.acctStatusint账号状态
data.finderListarray当前账号可管理的视频号列表
data.finderList[].finderUsernamestring视频号用户编码
data.finderList[].nicknamestring视频号昵称
data.finderList[].headImgUrlstring头像地址
data.finderList[].coverImgUrlstring封面地址
data.finderList[].spamFlagint风控标识
data.finderList[].acctTypeint账号类型
data.finderList[].authIconTypeint认证图标类型
data.finderList[].ownerWxUinnumber归属微信 UIN
data.finderList[].adminNicknamestring管理员昵称
data.finderList[].categoryFlagstring分类标识
data.finderList[].uniqIdstring视频号唯一 ID
data.finderList[].isMasterFinderboolean是否主视频号