How to solve TikTok Captcha
Find a values for
aid
andhost
parameters. The easiest way to do that is to redefinerenderCaptcha
function like this:renderCaptcha = ({aid, host}) => console.log(`aid: ${aid}, host: ${host}`)
Just run this code in the javascript console of your browser and then perform an action that leads to the captcha challenge. The values will be printed in the console.
It's enough to do that once. Values will be static for each page where you bypass the captcha.Clean your cookies and open a page where you need to bypass a captcha challenge. DO NOT PERFORM the action that leads to the captcha challenge.
Get all of the cookies set by the website.
Use all of the parameters required in a request to our API:
cookies
,aid
,host
andpageurl
.When using HTTP API (
in.php
,res.php
) cookies are sent as a string that containskey:value
pairs separated by semicolon. For example:name:value;other_name:value2;one_more_cookie:value3
. Do not include a domain name and other attributes.Get a response from our API. It will contain a set of cookies that you should apply in your browser or http client. Use the original domain cookies if needed when setting the cookies. After setting the cookies perform the action that is captcha protected (login or sign up button click, etc). If everything is fine and done within 3 seconds then captcha will not be displayed. JSON response example:
{ "status": 1, "request":"tt_webid:6854206562317010438;tt_webid_v2:6854206562317010438;SLARDAR_WEB_ID:c0fb77f5-ceb6-4d16-a066-61f19df1593e;s_v_web_id:verify_kd4reawo_zpQVF8KK_FFMI_4zuE_8NiQ_hayRdXyiKYtZ", "cookies": { "tt_webid": "6854206562317010438", "tt_webid_v2": "6854206562317010438", "SLARDAR_WEB_ID": "c0fb77f5-ceb6-4d16-a066-61f19df1593e", "s_v_web_id": "verify_kd4reawo_zpQVF8KK_FFMI_4zuE_8NiQ_hayRdXyiKYtZ" } }
Plain text response example:
OK|tt_webid:6854206562317010438;tt_webid_v2:6854206562317010438;SLARDAR_WEB_ID:c0fb77f5-ceb6-4d16-a066-61f19df1593e;s_v_web_id:verify_kd4reawo_zpQVF8KK_FFMI_4zuE_8NiQ_hayRdXyiKYtZ
