Appearance
登录视频号助手
用视频号助手的登录二维码确认登录,返回助手会话 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
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 1000 成功;其他值都是失败,通常是 1001 |
| message | string | 反馈信息 |
| data | object | 视频号助手登录结果 |
| data.sessionId | string | 视频号助手会话 ID |
| data.acctStatus | int | 账号状态 |
| data.finderList | array | 当前账号可管理的视频号列表 |
| data.finderList[].finderUsername | string | 视频号用户编码 |
| data.finderList[].nickname | string | 视频号昵称 |
| data.finderList[].headImgUrl | string | 头像地址 |
| data.finderList[].coverImgUrl | string | 封面地址 |
| data.finderList[].spamFlag | int | 风控标识 |
| data.finderList[].acctType | int | 账号类型 |
| data.finderList[].authIconType | int | 认证图标类型 |
| data.finderList[].ownerWxUin | number | 归属微信 UIN |
| data.finderList[].adminNickname | string | 管理员昵称 |
| data.finderList[].categoryFlag | string | 分类标识 |
| data.finderList[].uniqId | string | 视频号唯一 ID |
| data.finderList[].isMasterFinder | boolean | 是否主视频号 |