Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What level of access is required? #16

Open
completelyboofyblitzed opened this issue May 25, 2023 · 7 comments
Open

What level of access is required? #16

completelyboofyblitzed opened this issue May 25, 2023 · 7 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@completelyboofyblitzed
Copy link

completelyboofyblitzed commented May 25, 2023

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?

@MatthewWolff
Copy link
Owner

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?

@completelyboofyblitzed
Copy link
Author

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```

@MatthewWolff
Copy link
Owner

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!

@MatthewWolff MatthewWolff added the help wanted Extra attention is needed label May 26, 2023
@MatthewWolff MatthewWolff self-assigned this May 26, 2023
@f-montanari
Copy link

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.

@completelyboofyblitzed
Copy link
Author

Thank you, @f-montanari

@PanChengGuiFu
Copy link

May I ask if you have successfully run this code and how many urls can be scraped?

@MatthewWolff
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants