ช่อง WeChat วิดีโอของบัญชี API (V1)
สถานะสุขภาพของ API
สถานะดี มีสภาพ จำกัด ส่วนใหญ่ไม่มีสภาพ ไม่มีข้อมูล
กำลังโหลดสถานะสุขภาพ...
ดึงฟีดบัญชี WeChat Channels ที่แสดงเป็นหน้า โดยใช้ v2Name พร้อมการสนับสนุนการเก็บข้อมูลต่อเนื่อง ใช้เพื่อดูภาพยนตร์และข้อมูลฟีดอื่นๆ ที่เผยแพร่โดยบัญชีผู้สร้างที่รู้จัก
เนื้อหาของคำขอ
| ชื่อ | ตำแหน่ง | ชนิดข้อมูล | จำเป็น | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|---|---|
token |
form | string |
ใช่ | - | โทเค็นการเข้าถึงสำหรับบริการ API นี้ |
v2Name |
form | string |
ใช่ | - | id ตัวจริงของบัญชี WeChat Channels ซึ่งมักจะลงท้ายด้วย @finder. |
last_buffer |
form | string |
ไม่ใช่ | |
บัฟเฟอร์แบ่งหน้าจากการตอบกลับรายการวิดีโอของบัญชี WeChat Channels ครั้งก่อน เว้นว่างเมื่อขอหน้าแรก สำหรับเอนด์พอยต์ POST นี้ ให้ส่งในเนื้อหาฟอร์ม application/x-www-form-urlencoded |
ตัวอย่างโค้ด
bash
curl --max-time 120 -X POST 'https://api.justoneapi.com/api/weixin-channels/get-account-videos/v1' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'token=YOUR_API_KEY&v2Name=string&last_buffer='
text
ฉันต้องการใช้ API "วิดีโอของบัญชี (V1)" จาก JustOneAPI.
URL หลัก: https://api.justoneapi.com.
เส้นทาง API: /api/weixin-channels/get-account-videos/v1
เอนด์พอยต์ API: BASE_URL + /api/weixin-channels/get-account-videos/v1
เมธอด HTTP: POST
การยืนยันตัวตน: ส่ง "token" ในรูปแบบการส่งข้อมูลแบบ application/x-www-form-urlencoded.
คำนิยาม OpenAPI: https://docs.justoneapi.com/openapi/wechat-channels/account-videos-v1-th.json
หัวข้อการขอ:
- Content-Type: application/x-www-form-urlencoded
เนื้อหาคำขอ (รูปแบบ Form):
- token (form): โทเค็นการเข้าถึงสำหรับบริการ API นี้ (จำเป็น)
- v2Name (form): id ตัวจริงของบัญชี WeChat Channels ซึ่งมักจะลงท้ายด้วย @finder. (จำเป็น)
- last_buffer (form): บัฟเฟอร์แบ่งหน้าจากการตอบกลับรายการวิดีโอของบัญชี WeChat Channels ครั้งก่อน เว้นว่างเมื่อขอหน้าแรก สำหรับเอนด์พอยต์ POST นี้ ให้ส่งในเนื้อหาฟอร์ม application/x-www-form-urlencoded
รูปแบบที่ส่งกลับ: จัดการ JSON หรือข้อความอย่างปลอดภัยตามค่า Content-Type ที่ได้รับจริง
การจัดการผลตอบกลับและรหัสข้อผิดพลาด:
1. ตรวจสอบผลการทำงานจากฟิลด์ "code" ในผลตอบกลับ (รหัส 0 หมายถึงสำเร็จ)
2. แนะนำให้ตั้งระยะเวลารอ 120 วินาที หาก 120 วินาทีนานเกินไป ให้ตั้งอย่างน้อย 60 วินาที แต่คำขอบางรายการอาจหมดเวลาก่อนได้รับผลลัพธ์
3. รหัสผลลัพธ์:
- 0: สำเร็จ
- 100: โทเคนไม่ถูกต้องหรือถูกปิดใช้งาน
- 301: ดึงข้อมูลไม่สำเร็จ โปรดลองอีกครั้ง
- 302: เกินขีดจำกัดอัตราการเรียก
- 303: ใช้โควตารายวันครบแล้ว
- 400: พารามิเตอร์ไม่ถูกต้อง
- 500: ข้อผิดพลาดภายในเซิร์ฟเวอร์
- 600: ไม่มีสิทธิ์เข้าถึง
- 601: ยอดเงินคงเหลือไม่เพียงพอ
- 602: ถึงวงเงินของโทเคนแล้ว
4. รหัส 601 หมายถึงยอดเงินที่ใช้ร่วมกันของบัญชีไม่เพียงพอ รหัส 602 หมายถึงโทเคน API ถึงวงเงินสะสมของตนเองแล้ว การกำหนดวงเงินโทเคนจะไม่โอนเงินออกจากยอดเงินที่ใช้ร่วมกันของบัญชี
กรุณาช่วยเขียนสคริปต์ในภาษาโปรแกรมที่ฉันชื่นชอบเพื่อเรียกใช้ API และจัดการการตอบกลับ.
python
import requests
BASE_URL = "https://api.justoneapi.com" # ให้โดยเซิร์ฟเวอร์ OpenAPI
url = BASE_URL + "/api/weixin-channels/get-account-videos/v1"
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
data = "token=YOUR_API_KEY&v2Name=string&last_buffer="
response = requests.post(url, headers=headers, data=data, timeout=120)
print(response.status_code)
if response.content:
content_type = response.headers.get("content-type", "").lower()
if "json" in content_type:
try:
print(response.json())
except ValueError:
print(response.text)
elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
print(response.text)
else:
with open("response.bin", "wb") as output:
output.write(response.content)
print(f"Saved {len(response.content)} bytes to response.bin")
js
const BASE_URL = "https://api.justoneapi.com"; // ให้โดยเซิร์ฟเวอร์ OpenAPI
const url = BASE_URL + "/api/weixin-channels/get-account-videos/v1";
const response = await fetch(url, {
method: "POST",
headers: Object.fromEntries([
["Content-Type", "application/x-www-form-urlencoded"],
]),
body: "token=YOUR_API_KEY&v2Name=string&last_buffer=",
signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
const contentType = (response.headers.get("content-type") || "").toLowerCase();
const mediaType = contentType.split(";", 1)[0].trim();
const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
if (textual) {
const responseText = new TextDecoder().decode(responseBytes);
let data = responseText;
if (contentType.includes("json")) {
try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
}
console.log(data);
} else {
console.log(`Received ${responseBytes.byteLength} binary bytes`);
}
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) throws Exception {
final String BASE_URL = "https://api.justoneapi.com"; // ให้โดยเซิร์ฟเวอร์ OpenAPI
final String url = BASE_URL + "/api/weixin-channels/get-account-videos/v1";
HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
HttpRequest.Builder builder = HttpRequest.newBuilder()
.uri(URI.create(url))
.timeout(Duration.ofSeconds(120))
.header("Content-Type", "application/x-www-form-urlencoded")
.method("POST", HttpRequest.BodyPublishers.ofString("token=YOUR_API_KEY&v2Name=string&last_buffer="));
HttpRequest request = builder.build();
HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
System.out.println(response.statusCode());
String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
String mediaType = contentType.split(";", 2)[0].trim();
if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
System.out.println(new String(response.body(), StandardCharsets.UTF_8));
} else {
Files.write(Path.of("response.bin"), response.body());
System.out.println("Saved " + response.body().length + " bytes to response.bin");
}
}
}
go
package main
import (
"fmt"
"io"
"os"
"strings"
"net/http"
"time"
)
const BASE_URL = "https://api.justoneapi.com" // ให้โดยเซิร์ฟเวอร์ OpenAPI
func main() {
client := &http.Client{Timeout: 120 * time.Second}
url := BASE_URL + "/api/weixin-channels/get-account-videos/v1"
var data = strings.NewReader("token=YOUR_API_KEY&v2Name=string&last_buffer=")
req, _ := http.NewRequest("POST", url, data)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
resp, _ := client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
bodyBytes, _ := io.ReadAll(resp.Body)
contentType := strings.ToLower(resp.Header.Get("Content-Type"))
mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
fmt.Println(string(bodyBytes))
} else {
os.WriteFile("response.bin", bodyBytes, 0600)
fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
}
}
php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // ให้โดยเซิร์ฟเวอร์ OpenAPI
$url = $BASE_URL . '/api/weixin-channels/get-account-videos/v1';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, 'token=YOUR_API_KEY&v2Name=string&last_buffer=');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/x-www-form-urlencoded',
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
echo $response;
} else {
file_put_contents('response.bin', $response);
echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
ฟิลด์ที่ได้รับการตอบกลับ
ฟิลด์สำคัญในผลการตอบกลับที่สำเร็จ (code = 0).
การต่อเนื่องและการส่งข้อมูล4 ฟิลด์
data
ข่าวสารและข้อมูลการดำเนินการของบัญชีช่อง WeChat
| ฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
|---|---|---|
object |
array |
ข้อมูลในข่าวสารที่คืนมาในหน้านี้ |
feeds_count |
integer |
จำนวนฟีดที่รายงานโดย Channels อาจแตกต่างจากจำนวนฟีดที่ส่งกลับมาในหน้านี้ |
continue_flag |
integer |
ตัวบ่งชี้การดำเนินการต่อที่รายงานโดย Channels ในรูปแบบจำนวนเต็ม |
last_buffer |
string |
บัฟเฟอร์การดำเนินการต่อที่ไม่เปิดเผยสำหรับฟีด จะส่งกลับมาในรูปแบบ last_buffer ในคำขอรูปแบบเดียวกันสำหรับ v2Name |
ข้อมูลการเขียนข้อมูลสำหรับการส่งข้อมูล9 ฟิลด์
data.object[]
ข้อมูลในข่าวสารหนึ่งสำหรับช่อง
| ฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
|---|---|---|
object_id |
string |
ตัวระบุวัตถุช่อง WeChat, คืนมาในรูปแบบข้อความเพื่อรักษาความแม่นยำของจำนวนเต็มขนาดใหญ่ |
object_nonce_id |
string |
ตัวระบุ Nonce สำหรับข้อมูลในข่าวสาร |
export_id |
string |
ตัวระบุการส่งออกวิดีโอแบบไม่โปร่งใส สำหรับการแปลง ID |
title |
string |
ชื่อของฟีดที่ส่งกลับมา |
media_type |
string |
ประเภทของสื่อที่ส่งกลับมา |
publish_time |
string |
เวลาการเผยแพร่ที่รายงานไว้ในรูปแบบสตริงวันและเวลา |
sticky_time |
string |
เวลาที่รายงานไว้ในรูปแบบวันและเวลา อาจเป็นสตริงว่างก็ได้ |
openurl |
string |
ลิงก์สำหรับเปิดฟีดที่ส่งกลับมา |
live_info |
object |
อ็อบเจกต์ข้อมูลสดที่ส่งกลับมาพร้อมกับฟีด ว่างในฟีดที่ถูกเลือก |
สื่อและการมีส่วนร่วม9 ฟิลด์
data.object[]
| ฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
|---|---|---|
download_url |
string |
URL สำหรับดาวน์โหลดสื่อสำหรับฟีดที่ส่งกลับมา |
thumb_url |
string |
URL สำหรับแผ่นภาพสำหรับฟีดที่ส่งกลับมา |
cover_url |
string |
URL สำหรับภาพปกสำหรับฟีดที่ส่งกลับมา |
file_size |
integer |
ขนาดไฟล์สื่อที่รายงานสำหรับฟีดที่ส่งกลับมาในรูปแบบจำนวนเต็ม |
video_play_len |
integer |
ความยาวของการเล่นสื่อที่รายงานสำหรับฟีดที่ส่งกลับมาในรูปแบบจำนวนเต็ม |
like_count |
integer |
จำนวนคนที่ชื่นชอบฟีดที่ส่งกลับมา |
fav_count |
integer |
จำนวนคนที่ชอบฟีดที่ส่งกลับมา |
forward_count |
integer |
จำนวนคนที่ส่งต่อฟีดที่ส่งกลับมา |
comment_count |
integer |
จำนวนความคิดเห็นที่รายงานสำหรับฟีดที่ส่งกลับมา |
บัญชีและการยืนยันตัวตน17 ฟิลด์
data.contact
ข้อมูลบัญชีช่องสาธารณะที่ส่งกลับมาพร้อมกับฟีด
| ฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
|---|---|---|
username |
string |
ตัวระบุบัญชีช่องที่ส่งกลับมาในรูปแบบข้อความ ตัวระบุที่เห็นได้มีตัวอักษรที่ลงท้ายด้วย @finder |
nickname |
string |
ชื่อที่แสดงสำหรับบัญชีช่อง |
head_url |
string |
URL ของรูปภาพอวตารสำหรับบัญชีช่อง |
cover_img_url |
string |
URL ของรูปภาพปกสำหรับบัญชีช่อง มีสิทธิ์ว่างเปล่าได้ |
live_status |
integer |
รหัสสถานะสดที่รายงานสำหรับบัญชีช่อง |
live_cover_img_url |
string |
URL ของรูปภาพปกสดที่ส่งกลับมาสำหรับบัญชีช่อง มีสิทธิ์ว่างเปล่าได้ |
ext_info |
object |
ฟิลด์เพิ่มเติมของโปรไฟล์สาธารณะที่ส่งกลับมาสำหรับช่อง |
ext_info.country |
string |
ประเทศที่รายงานในโปรไฟล์ช่อง |
ext_info.province |
string |
จังหวัดหรือภูมิภาคที่รายงานในโปรไฟล์ช่อง |
ext_info.city |
string |
เมืองที่รายงานในโปรไฟล์ช่อง |
ext_info.sex |
integer |
รหัสเพศที่รายงานในโปรไฟล์ช่อง |
auth_info |
object |
รายละเอียดการตรวจสอบสาธารณะที่ส่งกลับมาสำหรับบัญชีช่อง |
auth_info.auth_icon_type |
integer |
รหัสประเภทสำหรับไอคอนการตรวจสอบของช่อง |
auth_info.auth_icon_url |
string |
URL ของรูปภาพสำหรับไอคอนการตรวจสอบของช่อง |
auth_info.auth_profession |
string |
ข้อความเกี่ยวกับอาชีพในรายละเอียดการตรวจสอบของช่อง |
auth_info.app_name |
string |
ชื่อแอปพลิเคชันที่รายงานพร้อมกับรายละเอียดการตรวจสอบ |
auth_info.detail_link |
string |
ลิงก์ที่ส่งกลับมาสำหรับรายละเอียดการตรวจสอบของช่อง |
บัญชีทางการที่เชื่อมโยงไว้21 ฟิลด์
data.contact
| ฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
|---|---|---|
bind_info |
array |
ข้อมูลเกี่ยวกับบัญชีที่เชื่อมโยงกับโปรไฟล์ช่อง |
bind_info[] |
object |
บัญชีหนึ่งที่เชื่อมโยงกับโปรไฟล์ช่อง |
bind_info[].profile_biz_info |
object |
ข้อมูลบัญชีทางการที่แสดงพร้อมกับโปรไฟล์ช่อง |
bind_info[].profile_biz_info.info |
array |
โปรไฟล์บัญชีทางการที่ส่งกลับมาสำหรับการเชื่อมโยง |
bind_info[].profile_biz_info.info[] |
object |
โปรไฟล์บัญชีทางการหนึ่งที่รายงานสำหรับการเชื่อมโยง |
bind_info[].profile_biz_info.info[].biz_username |
string |
ตัวระบุของบัญชีทางการที่เชื่อมโยง |
bind_info[].profile_biz_info.info[].biz_nickname |
string |
ชื่อที่ปรากฏของบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].profile_biz_info.info[].head_img_url |
string |
URL ของรูปภาพ Avatar สำหรับบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].profile_biz_info.info[].service_type_name |
string |
ป้ายกำกับประเภทบริการที่รายงานสำหรับบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].profile_biz_info.miniapps |
array |
เครื่องมือย่อที่ระบุสำหรับการเชื่อมโยงนี้。รายการในคำตอบที่เลือกคือว่างเปล่า |
bind_info[].biz_info |
object |
ข้อมูลบัญชีทางการที่เชื่อมโยงไว้ที่ส่งกลับมาสำหรับการเชื่อมโยงนี้ |
bind_info[].biz_info.info |
array |
โปรไฟล์บัญชีทางการที่ส่งกลับมาสำหรับการเชื่อมโยง |
bind_info[].biz_info.info[] |
object |
โปรไฟล์บัญชีทางการหนึ่งที่รายงานสำหรับการเชื่อมโยง |
bind_info[].biz_info.info[].biz_username |
string |
ตัวระบุของบัญชีทางการที่เชื่อมโยง |
bind_info[].biz_info.info[].biz_nickname |
string |
ชื่อที่ปรากฏของบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].biz_info.info[].head_img_url |
string |
URL ของรูปภาพ Avatar สำหรับบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].biz_info.info[].service_type_name |
string |
ป้ายกำกับประเภทบริการที่รายงานสำหรับบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].biz_info.info[].auth_info |
object |
รายละเอียดการตรวจสอบสาธารณะสำหรับบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].biz_info.info[].auth_info.auth_icon_type |
integer |
รหัสประเภทสำหรับไอคอนการตรวจสอบของบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].biz_info.info[].auth_info.auth_icon_url |
string |
URL ของรูปภาพไอคอนการตรวจสอบของบัญชีทางการที่เชื่อมโยงไว้ |
bind_info[].biz_info.miniapps |
array |
เครื่องมือย่อที่ระบุสำหรับการเชื่อมโยงนี้。รายการในคำตอบที่เลือกคือว่างเปล่า |
ภูมิภาคและสถิติบัญชี8 ฟิลด์
data
| ฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
|---|---|---|
ip_region_info |
object |
ข้อมูลภูมิภาคของ IP ที่แสดงสำหรับบัญชี |
ip_region_info.region_text |
string |
ข้อความภูมิภาคของ IP ที่แสดงสำหรับบัญชี |
mcn_info |
object |
อ็อบเจกต์ข้อมูลของเอเจนซี่ที่ส่งกลับมาสำหรับบัญชี ว่างในคำตอบที่ถูกเลือก |
anchor_stat |
object |
จำนวนการถ่ายทอดสดที่รายงานสำหรับช่อง |
anchor_stat.total_live_count |
integer |
จำนวนการถ่ายทอดสดรวมที่รายงานสำหรับช่อง |
anchor_stat.recent_live_count |
integer |
จำนวนการถ่ายทอดสดล่าสุดที่รายงานสำหรับช่อง |
live_duration_hours |
integer |
ระยะเวลาการถ่ายทอดสดที่รายงานเป็นชั่วโมง |
original_count |
integer |
จำนวนบทความในเนื้อหาต้นฉบับที่รายงานสำหรับช่องนั้น |
ตัวอย่างผลการตอบกลับ
กำลังโหลดตัวอย่างการตอบกลับ...