What level of access is required?
completelyboofyblitzed opened this issue · 7 comments
Hey, thanks for the project!
The free subscription tokens envoke the following error:
You currently have access to Twitter API v2 endpoints and limited v1.1 endpoints only. If you need access to this endpoint, you may need a different access level.
Do you really need to have a higher one?
I haven't seen a message like this before, and I don't have a credit card attached to any of my accounts.
Could you lay out the steps you took to reach this point, including the commands?
Sure, I just cloned the rep, edited the api_key.py
and ran python ./scrape.py -u phillipcompeau --by 1 --since 2023-05-22 --until 2023-05-23
the error was in ...\site-packages\tweepy\api.py", line 271, in request
raise Forbidden(resp)
tweepy.errors.Forbidden: 403 Forbidden
453 - You currently have access to Twitter API v2 endpoints and limited v1.1 endpoints 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/docs/twitter-api/getting-started/about-twitter-api#v2-access-level```
Thanks for the details. From what I can see, the Twitter V2 API hasn't had updates recently so I'm surprised to see this
I'll need to dive into this and see if I can replicate your error. It could potentially be the fact that my credentials are much older and I may have gotten grandfathered into something, as unlikely as that is. The soonest I could look at this is next week, though, but I'll try to come back to it!
According to twitter's developer portal, free tiers only have access to these 3 endpoints:
- POST /2/tweets
- DELETE /2/tweets/:id
- GET /2/users/me
Your issue comes from the package tweepy, that tries to access other endpoints not available in the free plan. I haven't found a way to circunvent this yet, unfortunately.
Thank you, @f-montanari
May I ask if you have successfully run this code and how many urls can be scraped?
The code has been successfully run as of my last commit. But note that recent changes to the twitter API as well as the post view limits that are active of July 1st may interfere with your ability to scrape. Further, Twitter has restricted the ability of non-accounts to use the search function. There's a note I left in the code that prints when you run it that addresses that!