Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

TikTok Real msToken

Documentación de la 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.

Precio
$0.001USD / llamada
Método
POST
Respuesta
JSON
Parámetros
0 obligatorios · 2 opcionales

Entorno de pruebas

Entrada
SalidaListo

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la 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.

Explorar más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
TikTok$0.001 por llamadaJSON
TikTok$0.001 por llamadaJSON
TikTok$0.001 por llamadaJSON
TikTok$0.001 por llamadaJSON
TikTok$0.001 por llamadaJSON
TikTok$0.05 por llamadaJSON

Guías:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Preguntas

FAQ

¿Cómo uso la API de TikTok Real msToken?

Envía una solicitud POST a https://api.sandbase.ai/v1/api/tiktok/web/generate-real-ms-token con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.

¿Cuánto cuesta la API de TikTok Real msToken?

$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de TikTok Real msToken?

No se requieren parámetros. Opcionales: browser_type (string) y random_strData (boolean). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de TikTok Real msToken?

Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de TikTok?

No. TikTok Real msToken funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de TikTok por separado.