Skip to content

创建视频号 ​

给当前账号创建一个视频号。

接口地址: POST /createFinder

说明与注意 ​

  • headImgUrl 要让接口服务能访问到。
  • 其他视频号接口要用的 userName、roleType,创建后从获取个人主页拿。

请求参数 ​

参数名必选类型说明
wId是string登录实例标识
nickName是string视频号名称
headImgUrl是string视频号头像链接

请求示例 ​

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

{
  "wId": "{{wId}}",
  "nickName": "Eyun 客户服务",
  "headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg"
}
bash
curl -X POST '{BASE_URL}/createFinder' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "wId": "{{wId}}",
  "nickName": "Eyun 客户服务",
  "headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg"
}'
python
import requests

url = "{BASE_URL}/createFinder"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "wId": "{{wId}}",
  "nickName": "Eyun 客户服务",
  "headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg"
}"""

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}/createFinder";
String body = "{\n" +
    "  \"wId\": \"{{wId}}\",\n" +
    "  \"nickName\": \"Eyun 客户服务\",\n" +
    "  \"headImgUrl\": \"https://cdn.eyunapp.com/avatar/finder-service.jpg\"\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}/createFinder';
$body = <<<'JSON'
{
  "wId": "{{wId}}",
  "nickName": "Eyun 客户服务",
  "headImgUrl": "https://cdn.eyunapp.com/avatar/finder-service.jpg"
}
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