Adi-SOUL / Twitter-Like-Downloader

帮你自动下载你喜欢的推文中包含的图片/ Help you to download the pics contained in the tweets which you liked
MIT License
0 stars 0 forks source link

Got 403 when start #1

Open i393612589 opened 5 months ago

i393612589 commented 5 months ago

Hi, Could please help to check the issue? thanks.

File "E:\Twitter_img_downloader\info_from_twitter\get_id.py", line 14, in get_id_through_name json_response = connect_to_endpoint(url=url, bearer_oauth=bearer_oauth_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Twitter_img_downloader\info_from_twitter__init__.py", line 14, in connect_to_endpoint raise Exception( Exception: Request returned an error: 403 {"client_id":"285XXXXX","detail":"When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.","registration_url":"https://developer.twitter.com/en/docs/projects/overview","title":"Client Forbidden","required_enrollment":"Appropriate Level of API Access","reason":"client-not-enrolled","type":"https://api.twitter.com/2/problems/client-forbidden"}

Adi-SOUL commented 5 months ago

Hi, This Exception may happen when the Twitter API token is not set correctly. Please check the following settings:

  1. Enter your Bearer Token at Twitter API Token, see the details: https://developer.twitter.com/en/docs/authentication/oauth-2-0/bearer-tokens
  2. Twitter has changed their API policy and now users on the free tier cannot perform searches, etc. :(

By the way, I can not provide a further debuging since I'm also one of users on the free tier.

Have a nice day!