room_idstringआवश्यक
Room ID
https://api.sandbase.ai/v1/api/douyin/web/generate-wss-xb-signatureReturns a signed xb parameter for Douyin web barrage WebSocket connections using a specified room ID, user browser agent, and unique user identifier.
[
{
"data": {
"x_bogus": "6M1MxCZygNhw8QPX"
}
}
]प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
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.
user_agent you send in your WebSocket headers.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.
| Name | Type | Required | Description |
|---|---|---|---|
room_id | string | Yes | Room ID |
user_agent | string | Yes | User browser agent |
user_unique_id | string | Yes | User unique ID |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"x_bogus": "6kux4VFjvCR1Mnox"
}
| Field | Meaning |
|---|---|
x_bogus | The signature string. The response holds only this one key, and its value is a short string such as 6kux4VFjvCR1Mnox. |
x_bogus | The value is built from the room_id, user_agent, and user_unique_id you sent. A different input set gives a different signature. |
x_bogus | Use this value as the xb signature in the barrage WebSocket connection for that room. |
room_id with Douyin Webcast ID to Room ID.user_agent and user_unique_id in the WebSocket connection that you used to create the signature.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
बिल्डिंग शुरू करें
एकीकृत authentication और usage tracking के साथ Platform API endpoint.
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": "example",
"user_agent": "example",
"user_unique_id": "example"
}'अपने SandBase API key को अपने सर्वर environment में सेट करें। Requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"अपना key सर्वर पर रखें। इसे browser code में expose न करें।
room_idstringआवश्यकRoom ID
user_agentstringआवश्यकUser browser agent
user_unique_idstringआवश्यकUser unique ID
इस API के लिए सेव किया गया example response; इसे देखते समय कोई live request नहीं की जाती।
[
{
"data": {
"x_bogus": "6M1MxCZygNhw8QPX"
}
}
]और जानें
| 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 |
प्रश्न
https://api.sandbase.ai/v1/api/douyin/web/generate-wss-xb-signature पर Authorization header (Bearer) में अपनी SandBase API key और parameters को JSON body के रूप में भेजें। आप इस पेज के Playground में बिना code लिखे भी इसे आज़मा सकते हैं।
$0.001 प्रति call, आपकी SandBase balance से बिल किया जाएगा। आपसे केवल आपके किए गए calls के लिए शुल्क लिया जाता है; कोई subscription नहीं है।
आवश्यक: room_id (string), user_agent (string) और user_unique_id (string)। Parameters table और इस पेज का Playground हर field सूचीबद्ध करते हैं।
एक JSON response जो उसी HTTP request में लौटाया जाता है (synchronous)। इस पेज का README एक sample response शामिल करता है।
नहीं। Douyin Barrage WSS XB Signature SandBase के माध्यम से चलता है, इसलिए एक SandBase API key इस endpoint और catalog के हर अन्य API और model को कवर करती है। आपको अलग से Douyin API access के लिए आवेदन करने की आवश्यकता नहीं है।