Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

TikTok Real msToken

Docs da 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.

Preço
$0.001USD / chamada
Método
POST
Resposta
JSON
Parâmetros
0 obrigatórios · 2 opcionais

Playground

Entrada
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da 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 mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
TikTok$0.001 por chamadaJSON
TikTok$0.001 por chamadaJSON
TikTok$0.001 por chamadaJSON
TikTok$0.001 por chamadaJSON
TikTok$0.001 por chamadaJSON
TikTok$0.05 por chamadaJSON

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

Perguntas

FAQ

Como eu uso a API TikTok Real msToken?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/tiktok/web/generate-real-ms-token com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API TikTok Real msToken?

$0.001 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API TikTok Real msToken aceita?

Nenhum parâmetro é obrigatório. Opcionais: browser_type (string) e random_strData (boolean). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API TikTok Real msToken retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor TikTok ou de uma chave de API?

Não. TikTok Real msToken funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do TikTok separadamente.