Appearance
修改视频号资料
修改当前视频号的昵称、简介、头像、地区和性别。
接口地址: POST /modFinderProfile
说明与注意
meUserName、meRoleType从获取个人主页的返回里取。headImgUrl要让接口服务能访问到。- 只改一项也要把其他字段传原值,没传的字段可能被清空。
请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| wId | 是 | string | 登录实例标识 |
| meUserName | 是 | string | 自己的视频号用户编码 |
| meRoleType | 是 | int | 自己的视频号角色类型 |
| nickName | 是 | string | 视频号昵称 |
| signature | 是 | string | 视频号简介 |
| headImgUrl | 是 | string | 视频号头像链接 |
| country | 是 | string | 国家 |
| province | 是 | string | 省份 |
| city | 是 | string | 城市 |
| sex | 是 | int | 性别 |
请求示例
http
POST {BASE_URL}/modFinderProfile
Authorization: Bearer <你的调用凭证>
Content-Type: application/json
{
"wId": "{{wId}}",
"meUserName": "v2_060000231003b20faec8c6e18f10c7d6c903ec3db0776955d3d97c6b329d6aa58693bcdb7ad1@finder",
"meRoleType": 3,
"nickName": "Eyun 客户服务",
"signature": "视频号简介",
"headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg",
"country": "CN",
"province": "Guangdong",
"city": "Guangzhou",
"sex": 2
}bash
curl -X POST '{BASE_URL}/modFinderProfile' \
-H 'Authorization: Bearer <你的调用凭证>' \
-H 'Content-Type: application/json' \
--data-raw '{
"wId": "{{wId}}",
"meUserName": "v2_060000231003b20faec8c6e18f10c7d6c903ec3db0776955d3d97c6b329d6aa58693bcdb7ad1@finder",
"meRoleType": 3,
"nickName": "Eyun 客户服务",
"signature": "视频号简介",
"headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg",
"country": "CN",
"province": "Guangdong",
"city": "Guangzhou",
"sex": 2
}'python
import requests
url = "{BASE_URL}/modFinderProfile"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
"wId": "{{wId}}",
"meUserName": "v2_060000231003b20faec8c6e18f10c7d6c903ec3db0776955d3d97c6b329d6aa58693bcdb7ad1@finder",
"meRoleType": 3,
"nickName": "Eyun 客户服务",
"signature": "视频号简介",
"headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg",
"country": "CN",
"province": "Guangdong",
"city": "Guangzhou",
"sex": 2
}"""
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}/modFinderProfile";
String body = "{\n" +
" \"wId\": \"{{wId}}\",\n" +
" \"meUserName\": \"v2_060000231003b20faec8c6e18f10c7d6c903ec3db0776955d3d97c6b329d6aa58693bcdb7ad1@finder\",\n" +
" \"meRoleType\": 3,\n" +
" \"nickName\": \"Eyun 客户服务\",\n" +
" \"signature\": \"视频号简介\",\n" +
" \"headImgUrl\": \"https://cdn.eyunapp.com/avatar/finder-service.jpg\",\n" +
" \"country\": \"CN\",\n" +
" \"province\": \"Guangdong\",\n" +
" \"city\": \"Guangzhou\",\n" +
" \"sex\": 2\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}/modFinderProfile';
$body = <<<'JSON'
{
"wId": "{{wId}}",
"meUserName": "v2_060000231003b20faec8c6e18f10c7d6c903ec3db0776955d3d97c6b329d6aa58693bcdb7ad1@finder",
"meRoleType": 3,
"nickName": "Eyun 客户服务",
"signature": "视频号简介",
"headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg",
"country": "CN",
"province": "Guangdong",
"city": "Guangzhou",
"sex": 2
}
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
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 1000 成功;其他值都是失败,通常是 1001 |
| message | string | 反馈信息 |
| data | object / null | 修改成功时通常返回 null |