user_agentstring
User browser agent (optional, uses default UA if not provided)
https://api.sandbase.ai/v1/api/tiktok/web/generate-wss-xb-signatureGenerates the X-Bogus signature required for TikTok WebSocket connections. Accepts an optional custom browser user-agent string.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Returns an X-Bogus signature string for TikTok WebSocket (WSS) connections. The only input is an optional user_agent string. If you leave it out, the API uses a default browser user agent.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-wss-xb-signature" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
user_agent | string | No | User browser agent (optional, uses default UA if not provided) |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"x_bogus": "fd9W5SN3j9PxkwTy"
}
| Field | Meaning |
|---|---|
x_bogus | The X-Bogus signature string for a TikTok WSS connection. |
x_bogus | In the example, the value is a 16-character string of letters and digits. Treat it as an opaque token and pass it on unchanged. |
x_bogus | The response has no other keys. Read this single value from the top level of the JSON object. |
{} to use the default user agent.user_agent, use the same string in the headers of your own WebSocket request so the two match.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-wss-xb-signature" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
user_agentstringUser browser agent (optional, uses default UA if not provided)
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.001 za wywołanie | JSON |
TikTok | $0.05 za wywołanie | JSON |
Przewodniki:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/tiktok/web/generate-wss-xb-signature z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Nie są wymagane żadne parametry. Opcjonalne: user_agent (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. TikTok WSS X-Bogus Signature działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API TikTok.