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.
- 料金
- $0.001USD / 回
- メソッド
- POST
- レスポンス
- JSON
- パラメータ
- 必須 0 件 · 任意 5 件
プレイグラウンド
[
{
"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"
}
}
]例
例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
API README
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.
開発を始める
最初のリクエストを送信
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
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. 認証
SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
3. パラメータ
refererstring
urlstring
user_agentstring
user_unique_idstring
4. レスポンス
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
[
{
"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"
}
}
]さらに探索
関連 APIs
| API | 価格 | レスポンス |
|---|---|---|
TikTok Web IDこの API TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.001 / 回 | JSON |
TikTok | $0.05 / 回 | JSON |
ガイド:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
質問
FAQ
TikTok Web ID API はどのように使いますか?
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/tiktok/web/generate-webid に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
TikTok Web ID API の料金はいくらですか?
1回あたり $0.001、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
TikTok Web ID API はどのパラメータを受け付けますか?
必須パラメータはありません。 任意: app_id (integer), referer (string), url (string), user_agent (string) と user_unique_id (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
TikTok Web ID API は何を返しますか?
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
TikTok の開発者アカウントまたは API key は必要ですか?
いいえ。TikTok Web ID は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。TikTok の API アクセスを別途申請する必要はありません。
