Sand AISand AI MAGI-2MAGI-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 / 回
メソッド
POST
レスポンス
JSON
パラメータ
必須 3 件 · 任意 0 件

プレイグラウンド

入力
Room ID
User browser agent
User unique ID
出力例
レスポンスoutputs · 67 B · 7 行
[
  {
    "data": {
      "x_bogus": "6M1MxCZygNhw8QPX"
    }
  }
]

例

例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。

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

質問

FAQ

Douyin Barrage WSS XB Signature API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/douyin/web/generate-wss-xb-signature に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Douyin Barrage WSS XB Signature API の料金はいくらですか?

1回あたり $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 は何を返しますか?

同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。

Douyin の開発者アカウントまたは API key は必要ですか?

いいえ。Douyin Barrage WSS XB Signature は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Douyin の API アクセスを別途申請する必要はありません。