question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] - TikTok blocks this request displaying a Captcha

See original GitHub issue

Description of the bug Systematic captcha error when using by_username method. Error message advises using proxy or a custom_verifyFp but this bug would also appear after a while in previous versions for which I had tried using proxy or a custom_verifyFp without success until a new version eventually fixed this issue. And this has happened quite a few times actually so I suppose you might know how to fix it again now. When you do, I’d be glad if you could explain how you did it, so I can fix it myself in the future and upload pull request quickly since I use your API on a daily basis.

The buggy code

from TikTokApi import TikTokApi as t
api = t.get_instance()
k = api.by_username("")

Error Trace

ERROR:root:Tiktok wants to display a catcha. Response is:
{"code":"10000","from":"","type":"verify","version":"","region":"va","subtype":"slide","detail":"GDIqyl9SLA5lVSsn4JVxPJ2cYRgDuhDP2NBDA0FqMagtMGQB8TGV2kpodkbZzjHKYcgIzsCRQbF60HRg3l9Qauc2Do6mMa-0Zg5zDKWegm2X6nPmvd0*iT3sZKcm1jeSXuYDR8MliQ8C-w5slo0ucQ-I1mouIfpZAPBvtuqCaLlitjnBe-x9821RxB7KI1poAlO19vIyMqX4daxORf7eHrqKoJv7CA03WhiLzQT0*0mhfkO1deNBCczMZ6SIL6hTp6aUbCoqz51dHuiKM-cGG*WHzU*snEBYxNaixbl84PVCwRqDYF1byBZiBDJ8jU50uDiiJ53EL3dtYdXtcoWBr6Q8F1Cly-FTFBOuwusDQEbR*bKMA23oExlFHGvq2mAlpYmzG*v-6mvF64wPNe1i1xh-qHQPS3zWJxo.","verify_event":"","fp":"verify_khr3jabg_V7ucdslq_Vrw9_4KPb_AJ1b_Ks706M8zIJTq","scene":"","verify_ticket":"","channel_mobile":"","sms_content":"","mobile":"","email":""}
ERROR:root:{'tt_webid': '1637611630395385016', 'tt_webid_v2': '1637611630395385016', 'csrf_session_id': '13d94c933ff245fd8bf4696164422b16', 'tt_csrf_token': 'vAtEBuHpdiZmCVUk'}
Traceback (most recent call last):
  File "C:\Users\me\Documents\0_Projet\herer\testt\bug.py", line 4, in <module>
    k = api.by_username(us)
  File "C:\Users\me\AppData\Roaming\Python\Python37\site-packages\TikTokApi\tiktok.py", line 603, in by_username
    **kwargs,
  File "C:\Users\me\AppData\Roaming\Python\Python37\site-packages\TikTokApi\tiktok.py", line 563, in user_posts
    res = self.get_data(url=api_url, **kwargs)
  File "C:\Users\me\AppData\Roaming\Python\Python37\site-packages\TikTokApi\tiktok.py", line 279, in get_data
    raise TikTokCaptchaError()
TikTokApi.exceptions.TikTokCaptchaError: TikTok blocks this request displaying a Captcha 
Tip: Consider using a proxy or a custom_verifyFp as method parameters

Desktop

  • OS: Windows 10
  • TikTokApi Version : 3.9.9

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:37 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
kpopdevcommented, Jul 2, 2021

@Alex-Laparra this will fix all captcha errors https://youtu.be/MgjorCvPzxg just watch it. im using firefox btw but i think on other Web browsers works too.

2reactions
kpopdevcommented, Jun 21, 2021

please fix it i have same problem. im using proxies too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix TikTok blocks this request displaying a Captcha
Try the following api = TikTokApi(use_api_endpoints=True) it uses TikTok's test endpoints which seem to have less security. Their entire desktop ...
Read more >
How to avoid a tiktok captcha? : r/AskProgramming
0 -> TikTok blocks this request displaying a Captcha. Tip: Consider using a proxy or a custom_verify_fp as method parameters.
Read more >
how to create a good verifyfp for TikTok-Api to bypass captcha ...
how to create a good verifyfp for TikTok -Api to bypass captcha error. Watch later. Share. Copy link. Info. Shopping. Tap to unmute....
Read more >
reCAPTCHA Help
It is easy for humans to solve, but hard for “bots” and other malicious software to figure out. By adding reCAPTCHA to a...
Read more >
Manage User Access Tokens
Most endpoints provided by TikTok for Developers require direct consent from ... user.info.basic gives read-only access to a user's avatar and display name....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found