TikTok Web ID
https://api.sandbase.ai/v1/api/tiktok/web/generate-webidReturns a TikTok web_id value for web session handling. Accepts optional parameters including url, app_id, referer, user_agent, and user_unique_id.
- Prezzo
- $0.001USD / chiamata
- Metodo
- POST
- Risposta
- JSON
- Parametri
- 0 obbligatori · 5 opzionali
Playground
[
{
"data": {
"e": 0,
"ssid": "un_support",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0",
"web_id": "7671202019835102733"
}
}
]Esempi
Seleziona un esempio per caricare i suoi input e il risultato nel playground.
README API
TikTok Web ID API
Returns a TikTok web_id string for use in web session handling, along with a user_agent string. All inputs are optional, and an empty request returns a value.
Use cases
- Get a
web_idto attach to TikTok web requests that need a session identifier. - Pass your own
user_agentorrefererto build a web session that matches the browser you simulate. - Pass a
user_unique_idto tie the generated ID to one browser context in your own tooling.
Request
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-webid" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
The result is returned in outputs[0].data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app_id | integer | No | |
referer | string | No | |
url | string | No | |
user_agent | string | No | |
user_unique_id | string | No |
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"e": 0,
"ssid": "un_support",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/1…",
"web_id": "7703847884642567693"
}
Response fields
| Field | Meaning |
|---|---|
web_id | The generated TikTok web ID, returned as a string of digits. |
user_agent | The browser user agent string returned with the ID. Reuse it in later web requests so the session stays consistent. |
ssid | A session value. The sample returns un_support, so do not rely on it. |
e | A status code. The sample returns 0. |
Notes
- All parameters are optional:
url,app_id,referer,user_agentanduser_unique_id. The sample request sent none of them. - Treat
web_idas a string. It is a long number and can lose digits if you parse it as a number. - Pair this with TikTok Web TTWID Identifier or TikTok Real msToken when you need other session values.
Pricing
$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Inizia a costruire
Invia la tua prima richiesta
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-webid" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. Autenticazione
Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
3. Parametri
refererstring
urlstring
user_agentstring
user_unique_idstring
4. Risposta
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
[
{
"data": {
"e": 0,
"ssid": "un_support",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0",
"web_id": "7671202019835102733"
}
}
]Esplora altro
API correlate
| API | Prezzo | Risposta |
|---|---|---|
TikTok Web IDQuesta API TikTok | $0.001 per chiamata | JSON |
TikTok | $0.001 per chiamata | JSON |
TikTok | $0.001 per chiamata | JSON |
TikTok | $0.001 per chiamata | JSON |
TikTok | $0.001 per chiamata | JSON |
TikTok | $0.05 per chiamata | JSON |
Guide:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Domande
FAQ
Come uso l'API TikTok Web ID?
Invia una richiesta POST a https://api.sandbase.ai/v1/api/tiktok/web/generate-webid con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
Quanto costa l'API TikTok Web ID?
$0.001 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Quali parametri accetta l'API TikTok Web ID?
Nessun parametro richiesto. Facoltativi: app_id (integer), referer (string), url (string), user_agent (string) e user_unique_id (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Cosa restituisce l'API TikTok Web ID?
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
Mi serve un account sviluppatore o una chiave API TikTok?
No. TikTok Web ID funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API TikTok.
