Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

Douyin Web TTWID Generator

Dokumentasi API
https://api.sandbase.ai/v1/api/douyin/web/generate-ttwid

Returns a Douyin web ttwid cookie value required for web session authentication. Accepts an optional custom user agent string.

Harga
$0.001USD / panggilan
Metode
POST
Respons
JSON
Parameter
0 wajib · 1 opsional

Playground

Input
OutputContoh
Responsoutputs · 176 B · 7 baris
[
  {
    "data": {
      "ttwid": "1%7CDUhgx1gk7BiWEvdAdekoqVeGk6a5k8MitMgWFagQJPg%7C1787219000%7C4a18a285f75af40fb5376e9da85e1dcf234dd9e1e27a4f2a4f78d8504744abac"
    }
  }
]

Contoh

Pilih contoh untuk memuat input dan hasilnya ke playground.

README API

Douyin Web TTWID Generator API

Returns a Douyin web 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

  • Build a Cookie header for Douyin web requests that need a ttwid value.
  • Replace a ttwid cookie in your own client when you start a new session.
  • Pair a generated ttwid with the same user_agent you send in later web requests.

Request

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

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

Parameters

NameTypeRequiredDescription
user_agentstringNo

Example response

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

{
  "ttwid": "1%7CvTde…"
}

Response fields

FieldMeaning
ttwidThe full Douyin web ttwid cookie value as a URL-encoded string. Use it as is in a cookie header.
ttwidThe value has four parts separated by %7C, which is an encoded /. Keep the separators when you copy the value.
ttwidThe parts are a short leading number, a token, a 10-digit number, and a long hex string. Treat the whole string as opaque and do not edit it.

Notes

Pricing

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

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
Douyin$0.001 per panggilanJSON
Douyin$0.001 per panggilanJSON
Douyin$0.001 per panggilanJSON
Douyin$0.001 per panggilanJSON
Douyin$0.001 per panggilanJSON
Douyin$0.03 per panggilanJSON

Panduan:Best Douyin API in 2026: Pricing Compared

Pertanyaan

FAQ

Bagaimana cara menggunakan API Douyin Web TTWID Generator?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/douyin/web/generate-ttwid dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API Douyin Web TTWID Generator?

$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API Douyin Web TTWID Generator?

Tidak ada parameter yang wajib. Opsional: user_agent (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API Douyin Web TTWID Generator?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API Douyin?

Tidak. Douyin Web TTWID Generator berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Douyin secara terpisah.