ナビゲーションにスキップ

What are msToken, ttwid, and verifyFp on Douyin (and how to skip them via API)?

Markdownとして表示

msToken, ttwid, and verifyFp (s_v_web_id) are Douyin web session and browser-fingerprint tokens that must stay synchronized with a_bogus and the client TLS fingerprint on direct web requests. When any token expires or comes from a mismatched IP or User-Agent, Douyin returns an empty JSON response or redirects to a verification gate.

BeatAPI handles Douyin session state and signing behind POST https://api.beatapi.io/v1/social-data/call and https://beatapi.io/mcp. Your caller passes only BEATAPI_API_KEY plus the target Douyin video ID, share link, or sec_user_id, with core Douyin actions starting at $0.003 per request (checked 2026-11-24; failed gateway calls cost $0).

What Douyin checks in msToken, ttwid, verifyFp, and a_bogus

ParameterLocationPurpose on DouyinCommon failure mode in scrapers
msTokenQuery string and cookieShort-lived environment token issued by ByteDance’s web SDK (mssdk)Static or synthetic values fail on search, comment, and user-feed actions
ttwidCookie (ttwid=...)Visitor session cookie issued by ttwid/checkTies sequential requests to one visitor state; datacenter IPs trigger rapid invalidation
verifyFp / s_v_web_idQuery string and cookieBrowser fingerprint token linked to slider-captcha verification stateOnce challenged, reusing the token returns empty responses until solved in a browser
a_bogusQuery stringDynamic JS signature (bdms.js) computed over query params and User-AgentBreaks when Douyin rotates its obfuscated web bundle (see a_bogus breakdown)

How to call BeatAPI Douyin actions without web tokens

BeatAPI provides 317 Douyin actions (App v3, Web, Search, Hot Search, and 73 Douyin Xingtu actions) without requiring msToken, ttwid, verifyFp, or a_bogus:

curl -sS https://api.beatapi.io/v1/social-data/call \
-H "Authorization: Bearer $BEATAPI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"action":"douyin.app.v3.fetch_one_video_by_share_url","params":{"share_url":"https://v.douyin.com/example/"}}'

Example comment response (live-sampled 2026-11-23, anonymized)

{
"object": "social_data.call",
"status": "succeeded",
"request_id": "task_example_01",
"action": "douyin.app.v3.fetch_video_comments",
"data": {
"total": 6303,
"has_more": 1,
"cursor": 20,
"comments": [
{
"cid": "7645931630120960805",
"text": "Sample viewer comment text",
"create_time": 1780207183,
"digg_count": 133,
"reply_comment_total": 7,
"ip_label": "天津",
"user": {
"nickname": "example_user",
"sec_uid": "MS4wLjABAAAA..."
}
}
]
}
}