Greetings!
I am trying to use Rtweet’s search_fullarchive command in R. I have subscribed to twitter developer’s premium account. However it returns an error saying:
Warning: list(message = “Forbidden: Authentication succeeded but account is not authorized to access this resource.”, sent = “2019-07-14T16:50:17+00:00”, transactionId = “xxxxxx”)
My codes are as below:
For appname:
I tried:
appname = “faktagram” and also “faktagram.json” (both not solving the issue)
token ← create_token(
app = appname,
consumer_key = cons_key,
consumer_secret = cons_sec,
access_token = acc_tok,
access_secret = acc_sec)
Do note that my access_token and access_secret are eligible for Read and write.
search_fullarchive(“manchester”,n=500,fromDate = “201812010000”,toDate = “201902010000”,env_name = appname,token = token)
Is there anything wrong with my syntax?
Additional note. I tried using hupseb’s “HTTR” method written here:
and it works fine. Thus i’m confused on how to use Rtweet’s search_fullarchive command.
I tried using the search_tweets(“manchester”, token = token) to ensure my token is not the problem, and it worked fine. Do help! Thanks in advance
1 Like
Additional Note:
When i used bearer_token for “token” argument in search_fullarchive it returns this error:
Error: This token does not have an app secret and therefore cannot create a bearer token
If the calls are working in a different R script, and returning results from premium endpoints, i’d make sure rtweet is calling things correctly - it’s a new feature so there might be bugs or missing documentation for how to use this properly - https://github.com/mkearney/rtweet/issues
Hello Igor,
As you stated on a message you sent me, it was true that i confused myself with the App Name and Environment Name. Hence, i wrote down a bit note for any beginners who might got confused.
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/dev name.
dev_name = "devname"
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.
2 Likes
system
closed
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.