英文:
403 Forbidden 453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints only
问题
我最近注册了免费级别的Twitter API,并且我想使用Tweepy帮助我从用户那里提取推文。
api_key = config['twitter']['api_key']
api_secret = config['twitter']['api_key_secret']
access_token = config['twitter']['access_token']
access_token_secret = config['twitter']['access_token_secret']
auth = tweepy.OAuthHandler(api_key, api_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
tweets = api.home_timeline()
但是在我运行它之后,出现了以下错误:
禁止访问:403 Forbidden 453 - 您目前只能访问Twitter API v2的子集和有限的v1.1端点(例如媒体发布、oauth等)。如果您需要访问此端点,可能需要不同的访问级别。您可以在这里了解更多信息:https://developer.twitter.com/en/portal/product。
如果我理解正确,Twitter API文档允许免费级别的访问。但是,我不确定为什么对我不起作用。
有没有专业人士知道如何解决这个问题?
英文:
I had recently registered for the free level Twitter API, and I would like to use Tweepy to help me extract tweets from users.
api_key = config['twitter']['api_key']
api_secret = config['twitter']['api_key_secret']
access_token = config['twitter']['access_token']
access_token_secret = config['twitter']['access_token_secret']
auth = tweepy.OAuthHandler(api_key, api_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
tweets = api.home_timeline()
But after I ran it, the below error showed up:
> Forbidden: 403 Forbidden 453 - You currently have access to a subset
> of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media
> post, oauth) only. If you need access to this endpoint, you may need a
> different access level. You can learn more here:
> https://developer.twitter.com/en/portal/product.
If I understand correctly, the Twitter API document did allow for free-level access. However, I am not sure why it does not work for me.
Does any professional know how to solve this issue?
答案1
得分: 9
抱歉,我的朋友,但是你不能使用Twitter API的搜索推文功能,使用免费级别访问。
你可以在免费级别访问上使用管理推文和用户查找功能。
要使用搜索推文功能,你需要升级到基本级别。
更多信息请访问:
https://developer.twitter.com/en/docs/twitter-api
英文:
Sorry, my friend, but you cannot use the Search Tweets feature using the Free Level Access on the Twitter API.
You can use the Manage Tweets and User Lookup features on Free Level Access.
For the Search Tweets feature, you have to upgrade to the Basic Level.
For more information:
答案2
得分: 0
即使使用基本订阅仍然出现相同的错误。在支付了基本套餐费用后,我注册了一个新的应用程序并获得了新的令牌和密钥。
453 - 您当前只能访问Twitter API v2的一部分端点和有限的v1.1端点(例如媒体发布、oauth等)。如果您需要访问此端点,可能需要不同的访问级别。您可以在此处了解更多信息:https://developer.twitter.com/en/portal/product
英文:
Even with the basic subscription am still getting the same error. After paying for the basic tier, i registered a new application and got new tokens and keys
453 - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论