Closed pedrotercero3 closed 2 years ago
Hi, what is this twitter_keys
object you show here? It seems a data.frame with some keys and data stored. But if there are several "bearer_token" this approach could provide several bearer tokens.
When you add the bearer token via the pop-up window, are you sure that the bearer token is still working and hasn't been updated or that you copied it all of it? If you tried several times it could be that there is some delay between approval and the API recognizing the result.
Could you show the result of auth_sitrep()
? This would help me detect if there is any problem with other saved authentications
Hi @llrs, and thanks for the quick reply. You're right, I've stored the keys in a data frame, but there's only one bearer token, so there's no room for mistakes. I tried authenticating several times via the pop-up window ensuring that I was copying it correctly and it still failed. I also waited for several hours between tries just in case there was a delay, as you said.
Here's the output of auth_sitrep()
:
Tokens found on C:/Users/pedrotercero/AppData/Roaming/R/config/R/rtweet:
token
app-auth A
I also tried using auth_as()
, and the token
argument directly in the search_tweets()
function, but nothing works.
Thanks for confirming this is indeed the right token. Probably you need authorization from Twitter or you have already used all your requests with that token (check documentation).
I don't think this is a bug from rtweet, as there isn't any warning or error on R side but the problem is on what Twitter returns. Closing this now, unless you find something that shows that it is a problem in rtweet (in that case I would reopen the issue to fix it).
Problem
I get the following 403 error message while trying to autheticate an app using the
rtweet_app()
function and following the official documentation:Expected behavior
Well, the expected behavior is to get the first 100 tweets according to the search criterion in the code below. I created a new app in the Twitter Developer account as especified in the documentation. I tried resetting the API keys, creating a new app again... nothing works. I tried inputting the bearer token both as shown in the code below and also using the
rtweet_app()
function as-is (which shows a new window where you can enter the token), getting the same error.Reproduce the problem
Code:
Output:
rtweet version
Session info