urlstringจำเป็น
The requested API URL, no need to URL encode
https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogusGenerates X-Gnarly and X-Bogus signature tokens for TikTok web requests using a target endpoint URL and optional request body parameters.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns signature tokens for a TikTok web request. You send the full target url, and optionally a body string for POST requests. The response contains xGnarly, xBogus, xDynosaur, and a signedUrl.
xGnarly value to attach to a TikTok web request that needs it.body.user_agent so your signed request uses the same browser string.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogus" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/tag/cat?_r=1&name=cat&u_code=f02lm2f78d1elh&_d=f02ll161mcjihj&share_challenge_id=7551&sharer_language=en&source=h5_m"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The requested API URL, no need to URL encode |
body | string | No | The API parameters of the request, applicable for POST requests |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"body": "",
"signature": {
"signedUrl": "https://www.tiktok.com/tag/cat?_r=1&name=cat&u_code=f02lm2f78d1elh&_d=f02ll161mc…",
"xBogus": "1",
"xDynosaur": "MaFdT8S5zzDCNu2FdzJoSPebgrTnVCKYHQQuRjpE8iRm1-MxvNak5hedfIyt4/NiDVBNySaJIg6kfva0…",
"xGnarly": "MaTjg74vTVfgmm0vW/dwPfk43OgEtyKRP28T6NjvhZPZhZ9JI-9WdjukhjSDmoIRoEMljTcYD8oyJ4gE…"
},
"status": "success",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/1…",
"version": "5.3.2"
}
| Field | Meaning |
|---|---|
signature.signedUrl | The input url with the signature parameters added, such as X-Dynosaur. You can use it as the request URL. |
signature.xGnarly | The X-Gnarly token generated for the given url. |
signature.xBogus | The X-Bogus value for the given url. In this sample it is 1, so check it before you rely on it. |
signature.xDynosaur | The X-Dynosaur token. The signedUrl carries this same value as a query parameter. |
body | The body string used for signing. It is empty when you send no body. |
user_agent | The browser user agent string used when the signatures were made. Send the same value in your request headers. |
version | The version string of the signing logic, here 5.3.2. |
status | Result of the call. A successful call returns success. |
url as a plain string. You do not need to URL encode it.body only for POST requests. Leave it out for GET requests.user_agent with your signed request so the headers match the signature.$0.005 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogus" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/tag/cat?_r=1&name=cat&u_code=f02lm2f78d1elh&_d=f02ll161mcjihj&share_challenge_id=7551&sharer_language=en&source=h5_m"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
urlstringจำเป็นThe requested API URL, no need to URL encode
bodyanyThe API parameters of the request, applicable for POST requests
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
TikTok | $0.005 ต่อการเรียก | 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
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/tiktok/web/generate-xgnarly-and-xbogus โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.005 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: url (string). ตัวเลือก: body (any). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น TikTok Web X-Gnarly and X-Bogus Signatures ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง TikTok API แยกต่างหาก