TikTok Web TTWID Identifier
https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwidReturns a valid TikTok ttwid cookie value for web session handling. Accepts an optional user_agent string to match specific browser environments.
- Fiyat
- $0.001USD / çağrı
- Yöntem
- POST
- Yanıt
- JSON
- Parametreler
- 0 gerekli · 1 isteğe bağlı
Oynatma Alanı
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
API README
TikTok Web TTWID Identifier API
Returns a TikTok ttwid cookie value as a single string. The only input is an optional user_agent string, so you can call it with an empty body.
Use cases
- Set the
ttwidcookie on a web client before it sends requests to TikTok web endpoints. - Pair the cookie with a specific browser
user_agentso your request headers stay consistent. - Fetch a new cookie value when a scraper needs a fresh web session identity.
Request
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwid" \
-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 |
|---|---|---|---|
user_agent | string | No |
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"ttwid": "1%7C0K27…"
}
Response fields
| Field | Meaning |
|---|---|
ttwid | The full cookie value as a URL-encoded string. Send it as ttwid=<value> in a Cookie header. |
ttwid | The value has four segments separated by %7C, which decodes to /. The segments are 1, a short token, a 10-digit number, and a 64-character hex string. |
ttwid | The 10-digit third segment looks like a Unix timestamp in seconds. The response does not say if it marks creation or expiry. |
Notes
- Send
{}to get a cookie with nouser_agent. Adduser_agentto match a specific browser string. - The value is already URL-encoded. Use it as is, without encoding it again.
- Related tokens for TikTok web requests: TikTok Web ID, TikTok Real msToken and TikTok Web X-Bogus Signature.
Pricing
$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Geliştirmeye başlayın
İlk isteğinizi gönderin
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwid" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'2. Kimlik doğrulama
SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
3. Parametreler
4. Yanıt
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
İlgili APIs
| API | Fiyat | Yanıt |
|---|---|---|
TikTok | $0.001 çağrı başına | JSON |
TikTok | $0.001 çağrı başına | JSON |
TikTok | $0.001 çağrı başına | JSON |
TikTok | $0.001 çağrı başına | JSON |
TikTok | $0.001 çağrı başına | JSON |
TikTok | $0.05 çağrı başına | JSON |
Kılavuzlar:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
Sorular
SSS
TikTok Web TTWID Identifier API'sini nasıl kullanırım?
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/tiktok/web/generate-ttwid adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
TikTok Web TTWID Identifier API'sinin fiyatı nedir?
çağrı başına $0.001, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
TikTok Web TTWID Identifier API'si hangi parametreleri kabul eder?
Gerekli parametre yoktur. İsteğe bağlı: user_agent (string). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.
TikTok Web TTWID Identifier API'si ne döndürür?
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Bir TikTok geliştirici hesabına veya API anahtarına ihtiyacım var mı?
Hayır. TikTok Web TTWID Identifier, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. TikTok API erişimi için ayrıca başvuru yapmanız gerekmez.
