I need to use the rtweet search_fullarchive to access historical data. I have two developer accounts: one is elevated and the other is academic. This stackoverflow suggested Academic had not been given elevated access, so I primarily used the elevated account. I believe the elevated account is just sandbox, not paid.
I have used two methods of generating authentication tokens for the search. Method 1 is said to be deprecated:
auth <- create_token(
app = "App Name",
consumer_key="",
consumer_secret="",
access_token = "",
access_secret = "",
set_renv = TRUE
)
Method 2 requests the bearer token:
auth_as(rtweet_app())
The search form is:
data<-search_fullarchive("#rstats", n=10, env_name="MyAppName", parse=TRUE, token=auth,fromDate=201401010000",toDate="201401312359")
I have received the 400 errors "Unauthorized" and "Forbidden", but I am not sure of their priority in printing. Is it possible the "sandbox" status of my Elevated account is not authorized? Or is there some new way to authenticate to the Twitter API now?
I did read about the environment vs. app name issue here, but definitely received errors using anything other than the app name as the env_name value. I think that might be an incorrect stackoverflow and will update it if I find evidence confirming it.