Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

TikTok Real msToken

Dokumentacja API
https://api.sandbase.ai/v1/api/tiktok/web/generate-real-ms-token

Produces a real msToken for TikTok web requests. Accepts optional configuration parameters including browser type and randomized string data.

Cena
$0.001USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
0 wymaganych · 2 opcjonalnych

Playground

Wejście
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

TikTok Real msToken API

This API returns a real msToken string for TikTok web requests. It needs no input, but you can pass browser_type and random_strData to change how the token is made.

Use cases

  • Add a fresh msToken to TikTok web requests that need one as a query parameter or cookie.
  • Request a token for a specific browser type by setting browser_type.
  • Test how random_strData changes the token you get back.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-real-ms-token" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

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

Parameters

NameTypeRequiredDescription
browser_typestringNo
random_strDatabooleanNo

Example response

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

{
  "browser_type": null,
  "msToken": "DFJLzkge…",
  "random_strData": false
}

Response fields

FieldMeaning
msTokenThe generated token string. Pass this value as the msToken in your TikTok web requests.
browser_typeEchoes the browser_type you sent. It is null when you leave the parameter out.
random_strDataEchoes the random_strData flag you sent. It is false in the sample call, where the parameter was not set.

Notes

  • Both parameters are optional. An empty {} body returns a token.
  • browser_type is a string and random_strData is a boolean.
  • The token contains letters, digits, - and _. Copy it as is without extra encoding changes.
  • For signed requests, pair the token with TikTok Web X-Bogus Signature or TikTok Web TTWID Identifier.

Pricing

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

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.05 za wywołanieJSON

Przewodniki:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Pytania

FAQ

Jak używać API TikTok Real msToken?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/tiktok/web/generate-real-ms-token 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.

Ile kosztuje API TikTok Real msToken?

$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API TikTok Real msToken?

Nie są wymagane żadne parametry. Opcjonalne: browser_type (string) i random_strData (boolean). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API TikTok Real msToken?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego TikTok lub klucza API?

Nie. TikTok Real msToken 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.