Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent 401 Error in Rtweet #769

Closed
knelson3-trinity opened this issue Apr 6, 2023 · 2 comments
Closed

Persistent 401 Error in Rtweet #769

knelson3-trinity opened this issue Apr 6, 2023 · 2 comments

Comments

@knelson3-trinity
Copy link

I have academic access to Twitter. On February 14 (the last time I worked on my project), I received authentication by running the below code (where app name and keys are their actual strings, not the word "INSERT"):
my_auth<-rtweet::create_token(rtweet::create_token(app = "INSERT",
consumer_key = "INSERT",
consumer_secret = "INSERT",
access_token="INSERT",
access_secret = "INSERT"))
When I ran identical code on April 6, I get the following 401 error: "Error in httr::init_oauth1.0(endpoint, app, permission = permission, is_interactive = is_interactive, : Unauthorized (HTTP 401)."

I've tried the following:

  1. regenerating and re-entering the consumer key, consumer secret, access token, and access secret
  2. using a different version of retweet install.packages("rtweet", repos = 'https://ropensci.r-universe.dev/'), pursuant to the recommendations from this thread: Authentication failing with auth_setup_default() #756.

Both method 1 and 2 had no effect.

A third method, recommended in this thread (#204), is to turn off "callback looping" on my app. Despite extensive google searching and scouring my app, I simply cannot figure out how to do this. If folks believe this is likely to solve my problem (it seemed to have a roughly 50-50 chance of doing so as per the above thread), I would greatly appreciate info on how to turn off "callback looping." If something else entirely is the issue, I'd appreciate any advice.

@llrs
Copy link
Member

llrs commented Apr 6, 2023

As explained in one comment of the linked issues the default app was banned from twitter.

If you are trying to create your own, it will probably not work because recently there have been changes in the API access (I assume that using create_token(create_token()) is just a copy paste error). This could be a problem with their servers too.

The callback looping is a very old reference that I think is no longer relevant to rtweet as it is now.

I would recommend to use rtweet_app or rtweet_oauth2 authentication mechanisms.

@llrs
Copy link
Member

llrs commented Apr 11, 2023

Closing as I haven't heard back

@llrs llrs closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants