I have just received an Academic Twitter Developer privileges and am attempting to scrape some tweets. I updated RStudio, regenerated a new bearer token once I got updated Academic Twitter access, and get_bearer() returns my new bearer token. However, I continue to get the following error:

Error in make_query(url = endpoint_url, params = params, bearer_token = bearer_token,  : 
  something went wrong. Status code: 403
In addition: Warning messages:
1: Recommended to specify a data path in order to mitigate data loss when ingesting large amounts of data. 
2: Tweets will not be stored as JSONs or as a .rds file and will only be available in local memory if assigned to an object. 

Additionally, I have tried specifying a data path, but I think I am confused as to what these means? I think that's where my issue lies, but does the data path way mean like a specific file pathway on my computer?

Below is the code I was attempting to use.This code worked previously with my professor's bearer token that they used to just show the output:

`tweets <-
 get_all_tweets(
   query = "#BlackLivesMatter",
   start_tweets = "2020-01-01T00:00:00Z",
    end_tweets = "2020-01-05T00:00:00Z",
    n = 100)` 

Thanks in advance!

1

There are 1 answers

1
Juan Pablo On

Status code 403 means forbidden. You may want to check the error codes reference page of Twitter API here. Perhaps your bearer token is misspelled?