Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Douyin Barrage WSS XB Signature

เอกสาร API
https://api.sandbase.ai/v1/api/douyin/web/generate-wss-xb-signature

Returns a signed xb parameter for Douyin web barrage WebSocket connections using a specified room ID, user browser agent, and unique user identifier.

ราคา
$0.001USD / คำขอ
Method
POST
การตอบกลับ
JSON
พารามิเตอร์
3 จำเป็น · 0 ไม่บังคับ

Playground

อินพุต
Room ID
User browser agent
User unique ID
เอาต์พุตตัวอย่าง
การตอบกลับoutputs · 67 B · 7 บรรทัด
[
  {
    "data": {
      "x_bogus": "6M1MxCZygNhw8QPX"
    }
  }
]

ตัวอย่าง

เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground

API README

Douyin Barrage WSS XB Signature API

Returns a signature string for a Douyin live room barrage (danmaku) WebSocket connection. It needs a room_id, a browser user_agent string, and a user_unique_id.

Use cases

  • Sign a Douyin live room WebSocket URL before you open the barrage stream.
  • Generate a signature for each viewer identity when you run several chat listeners.
  • Pair the signature with the same user_agent you send in your WebSocket headers.

Request

curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/generate-wss-xb-signature" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"room_id": "7382517534467115826", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0", "user_unique_id": "7382524529011246630"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
room_idstringYesRoom ID
user_agentstringYesUser browser agent
user_unique_idstringYesUser unique ID

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "x_bogus": "6kux4VFjvCR1Mnox"
}

Response fields

FieldMeaning
x_bogusThe signature string. The response holds only this one key, and its value is a short string such as 6kux4VFjvCR1Mnox.
x_bogusThe value is built from the room_id, user_agent, and user_unique_id you sent. A different input set gives a different signature.
x_bogusUse this value as the xb signature in the barrage WebSocket connection for that room.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

สำรวจเพิ่มเติม

APIs ที่เกี่ยวข้อง

APIs ทั้งหมด
APIราคาการตอบกลับ
Douyin$0.001 ต่อการเรียกJSON
Douyin$0.001 ต่อการเรียกJSON
Douyin$0.001 ต่อการเรียกJSON
Douyin$0.001 ต่อการเรียกJSON
Douyin$0.001 ต่อการเรียกJSON
Douyin$0.03 ต่อการเรียกJSON

คู่มือ:Best Douyin API in 2026: Pricing Compared

คำถาม

คำถามที่พบบ่อย

ฉันจะใช้ Douyin Barrage WSS XB Signature API ได้อย่างไร?

ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/douyin/web/generate-wss-xb-signature โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด

Douyin Barrage WSS XB Signature API ราคาเท่าไร?

$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน

Douyin Barrage WSS XB Signature API รับพารามิเตอร์อะไรบ้าง?

ที่ต้องระบุ: room_id (string), user_agent (string) และ user_unique_id (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์

Douyin Barrage WSS XB Signature API ส่งคืนอะไร?

การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ

ฉันจำเป็นต้องมีบัญชีนักพัฒนาหรือ API key ของ Douyin ไหม?

ไม่จำเป็น Douyin Barrage WSS XB Signature ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Douyin API แยกต่างหาก