1

I am trying to use rtweet's search_fullarchive using my premium token registered at Twitter Developer. However, I got an error message of:

Warning: list(message = "Forbidden: Authentication succeeded but account is not authorized to access this resource.", sent = "2019-07-14T14:30:11+00:00", transactionId = "xxxxxxxxxx")

How do I get past this problem? Is there an error in the way i code?

I ensured my token is working well by testing it using httr's POST method and it worked completely fine.

I also tested my token using normal search_tweets, and also worked fine.

cons_key = "xxx"
cons_sec = "xxx"
acc_tok = "xxx"
acc_sec = "xxx"
app = "abc"

token = rtweet::create_token(app,cons_key,cons_sec,acc_tok,acc_sec)

manutd = search_fullarchive("manchester united",n=500,
fromDate = "201812010000",toDate = "201902010000",
env_name = app,token = token)

I expected a tibble dataframe as usually Rtweet's returns. However this is what i received:

"Warning: list(message = "Forbidden: Authentication succeeded but account is not authorized to access this resource.", sent = "2019-07-14T14:30:11+00:00", transactionId = "xxxxxxxxxx")" data frame with 0 columns and 0 rows

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
superzubs
  • 31
  • 5
  • 1
    In terms of troubleshooting steps, I would double-check that your app (with cons_key of "xxx") has been connected with the correct developer environment (i.e. "abc") for full archive search over on the Twitter developer dashboard. The error you're seeing is something I would expect to see if there was an issue with the setup there. – Andy Piper Jul 14 '19 at 16:48
  • Thanks Andy! It seems that i was confused with the terms used. To help any beginners who might have trouble with the same thing, i'll write down a bit of explanation below – superzubs Jul 15 '19 at 04:49

1 Answers1

2

To help anyone who might have trouble with the same thing, i'll write down a bit of explanation. Firstly, if you have registered a premium account, go to

To create the token, you need the App Name.

token = rtweet::create_token(app_name,cons_key,cons_sec,acc_tok,acc_sec)

To do query, you need the environment name.

search_fullarchive(q, n = 100, fromDate = NULL, toDate = NULL, env_name = "dev_name", safedir = NULL, parse = TRUE, token = token)

Hope it helps beginners or anyone who might have the same troubles.

superzubs
  • 31
  • 5
  • I have premium account and I use the same code it not working for me: cons_key = "xxx" cons_sec = "xxx" acc_tok = "xxx" acc_sec = "xxx" app = "HCT_UAE" token = rtweet::create_token(app,cons_key,cons_sec,acc_tok,acc_sec) hct<-search_fullarchive("HCT_UAE", n = 100, fromDate = "201901010000", toDate = "201911212359", env_name = "dev_hct", safedir = NULL, parse = TRUE, token = token) – Uttam Raj Dec 10 '19 at 08:50