How to solve this - Error: Twitter API failed [401]?

158 Views Asked by At

I am using R.

typed this (with my credentials)

token <- create_token(
  app = "",  
  consumer_key = "",  
  consumer_secret ="",  
  access_token = "",  
  access_secret = "" 
)

and later this way:

bearer_token <- ""
tweets <- search_tweets("data science", n = 100, token = bearer_token)

Got this : Error: Twitter API failed [401]. Check error message at https://developer.twitter.com/en/support/twitter-api/error-troubleshooting
 * Could not authenticate you. (32)
In addition: Warning message:
Could not authenticate you. (32)

What can i do?

I have developer account i see this :ž

MONTHLY TWEET CAP USAGE

0%

0 Tweets pulled of 1,500Resets on October 18 at 00:00 UTC

**I set the privileges: read and write; type of app - web app or bot, callback url (I’m not sure what I should have put there?), I found access key and token, consumer key and secret as well as Bearer Token. ** Every time I try using the rtweet package in R I get this error which is in the title of the question. I tried in python the same with tweepy but I get this " 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" .

A little while ago I tried again in R and I get this “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”

I would really like to ask someone who knows the solution to help me as I don’t understand what I’m doing wrong or for someone from the mod or twitter team to contact me to help me

0

There are 0 best solutions below