Skip to content
POST/getAsynSnsSendVideoResJSONAuthorization 请求头在 API 调试中打开

查询视频朋友圈结果 ​

查询异步发送视频朋友圈的结果,asynId 来自它的返回。

接口地址: POST /getAsynSnsSendVideoRes

说明与注意 ​

  • 每 2 秒查一次即可;也可以不轮询,等回调消息。
  • 结果在服务端保留 10 分钟,状态每更新一次重新计时;过期再查返回「asynId不存在或已过期」。

请求参数 ​

参数名必选类型说明
asynId是string异步发送视频朋友圈返回的 asynId

请求示例 ​

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

{
  "asynId": "04d0af77-3877-4621-85ce-c8bee6a460e4"
}
bash
curl -X POST '{BASE_URL}/getAsynSnsSendVideoRes' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "asynId": "04d0af77-3877-4621-85ce-c8bee6a460e4"
}'
python
import requests

url = "{BASE_URL}/getAsynSnsSendVideoRes"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "asynId": "04d0af77-3877-4621-85ce-c8bee6a460e4"
}"""

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}/getAsynSnsSendVideoRes";
String body = "{\n" +
    "  \"asynId\": \"04d0af77-3877-4621-85ce-c8bee6a460e4\"\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}/getAsynSnsSendVideoRes';
$body = <<<'JSON'
{
  "asynId": "04d0af77-3877-4621-85ce-c8bee6a460e4"
}
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": {
    "asynId": "04d0af77-3877-4621-85ce-c8bee6a460e4",
    "type": 1,
    "id": "13768766054025736468",
    "userName": "wxid_phyyedw9xap22",
    "createTime": 1641364819,
    "objectDesc": "今天还是可以的",
    "des": null
  }
}

错误响应 ​

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

响应参数 ​

参数名类型说明
codestring1000 成功;其他值都是失败,通常是 1001
messagestring反馈信息
dataobject发送结果
data.asynIdstring异步任务标识
data.typeint发送状态: 0 发送中、1 发送完成、2 发送失败
data.idstring朋友圈 ID
data.userNamestring发送者微信 ID
data.createTimelong发送时间戳
data.objectDescstring朋友圈文字内容
data.desstring描述