ropensci / rtweet

🐩 R client for interacting with Twitter's [stream and REST] APIs
https://docs.ropensci.org/rtweet
Other
785 stars 201 forks source link

The end of support of free access to the Twitter API? #761

Open erdnaxel opened 1 year ago

erdnaxel commented 1 year ago

Twitter posted this today: image

Does it mean rtweet will no longer work?

llrs commented 1 year ago

Hi, thank you for asking. I posted my comment in several places: quoting the tweet, in a comment, and in another issue.

The package will work if they don't change anything else. What will change is that I will no longer be able to test and develop without paying, and only people or companies that pay for the API will be able to use it.

I will post more as the events develop, but I will probably write a post in my blog and announce my decision in twitter, and here.

llrs commented 1 year ago

There is new information from Twitter in a new thread: There seems to be some kind of free plan, but premium users might lose access (unless they "upgrade" to a new tier/access/?).

As with the last update a week ago, let's see what happens.

erdnaxel commented 1 year ago

thanks for the update!

llrs commented 1 year ago

Developer might have received the following email, I only received an email from one of my twitter accounts with developer access (I removed the links which have tracking ids):

Hello,

We are excited to share some updates regarding the Twitter API so you can keep building and innovating with us. Twitter offers one of the world’s most powerful data sets, and our recent updates will enable you to continue to tap into all its potential.

Basic access On February 13, we will introduce our new low-cost, basic access that offers a low level of API usage, and full access to Ads API for a $100 monthly fee. This basic access will replace our previous access levels (Essential, Elevated, and Academic Research). We will provide instructions on how to subscribe to the basic access through our website on Monday.

Limited free access As this is extremely important to the developer ecosystem, we will also introduce a new form of free write access to the Twitter API limited to Tweet creation of up to 1,500 Tweets per month for a single authenticated user token, as well as including free access to Login with Twitter. If you are currently on a free tier and you want to take advantage of the new limited free access, no actions are necessary - you will automatically be switched to the new free access on February 13.

Premium API deprecation On February 13, we will also deprecate the Premium API access. If you’re subscribed to Premium, you can apply for Enterprise access here to continue using these endpoints.

We truly believe that the developer community can continue to create value with our Twitter API. We hope you are excited about this new chapter of the Twitter Developer Platform as we continue to invest in our ecosystem’s success. Please continue to follow @TwitterDev for the latest updates.

Thank you, The Twitter Developer Platform team

It seems that every user of rtweet will need to apply for developer access (the credentials currently shared with rtweet might no longer work). Once authenticated they might be able to post tweets. The authentication mechanism and how they will restrict the access to the API v2 will decide the future of rtweet.

under-score commented 1 year ago
> setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)
[1] "Using direct authentication"
Error in check_twitter_oauth() : OAuth authentication error:
This most likely means that you have incorrectly called setup_twitter_oauth()

maybe the error message should be read "you have been kicked out?"

llrs commented 1 year ago

@under-score The setup_twitter_oauth function is not from rtweet. Did you mean to comment in a different package? rtweet is working because as explained in this thread there haven't been any changes in the API (yet).

under-score commented 1 year ago

sorry, installed the twitter packages long ago, but also the same effect here

> auth <- rtweet_app()
> df <- search_tweets("#rstats", token = auth)
Error: Twitter API failed [403]. Check error message at https://developer.twitter.com/en/support/twitter-api/error-troubleshooting 
 * You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve (453)
llrs commented 1 year ago

@under-score 1) This means your authentication method used will work with the API v2 (which currently rtweet only supports the streaming endpoints). This is expected, and rtweet works as expected. 2) Please make sure before posting here that it is relevant to the issue.

llrs commented 1 year ago

In the latest update of TwitterDev, they postpone the changes:

There has been an immense amount of enthusiasm for the upcoming changes with Twitter API. As part of our efforts to create an optimal experience for the developer community, we will be delaying the launch of our new API platform by a few more days.

More information to follow over the coming days. Thank you for your continued interest and patience!

Of interest, it seems, that internally they increased the tweet length to more than 280 characters as that tweet has > 350 characters (and no link). Other accounts, which seem used internally for testing, had previously also tweeted with more than 280.

llrs commented 1 year ago

Hi all, I wrote a post. Let me know if you you have comments or other feedback here.

cc: @eliocamp, @ccamara, you were interested in this.

llrs commented 1 year ago

Some relevant information from TwitterSupport confirming that there is few testing before changes affect the platform (this happened before November 2022 too):

Some parts of Twitter may not be working as expected right now. We made an internal change that had some unintended consequences. We’re working on this now and will share an update when it’s fixed.

The API seems to still work (but not tweetdeck, or links, and some images are not displayed). Posting it here in case anyone is wondering

llrs commented 1 year ago

Today Twitter released more information about the planned updates. In addition, they will remove the Standard (v1.1), Essential (v2), Elevated (v2), and Premium access tiers in 30 days.

Free: Post and delete tweets and look up information from one (user_self()) at most post up to 1500 Tweets per month Basic: Retrieve up to 10K Tweets per month, and 50,000 POST/month, 2 app IDs for $100.00 USD/month and use all the other endpoints except the streaming endpoints. Higher rates: Available through a form Academic: To be announced

llrs commented 1 year ago

In an expected move Twitter removed the access of the default app of rtweet. See this comment in another issue. Currently this is the situation: default authentication does not work, bearer token do and the default OAuth2 provided work.

llrs commented 1 year ago

There is an update from Twitter:

As announced previously, we have deprecated our legacy Twitter API access tiers. Thus, essential and elevated packages are no longer available. Applications and projects have been placed in the appropriate new Free access tier.

If your app has been suspended as part of this, please sign up for the Free access tier to have it unsuspended.

As a reminder, the Free access tier supports:

If you want to use other functionality in the Twitter API v2, please consider using the Basic or Pro packages. Learn more about these packages here.

Thank you.

sunta3iouxos commented 1 year ago

Sorry for posting here, are all those updates mean that rtweet will not work? I just found this R function, since I wanted to extract scientific topics and links to publications. But, I am not able to use it. I am getting the following: rtweet_user() Error in rtweet_user(): ! The default authentication was suspended. â„č Please provide your own authentication see: vignette('auth', 'rtweet') Run rlang::last_trace() to see where the error occurred. Sorry, if this is off-topic, otherwise I will create a newer inquire Thank you

llrs commented 1 year ago

Rtweet continues to work, but it might only work on some endpoints or with limited (free) access.

As the error message says, you'll need to provide your own credentials. If you have troubles, please ask a question (this is not an issue in the package) in StackOverflow, discuss.ropensci.org or community.rstudio.com with the rtweet tag.

llrs commented 1 year ago

I have received a new message:

As part of our ongoing effort to modernize and transform our API platform, we are deprecating some of our v1.1 endpoints and asking you to migrate to the v2 equivalent (see table below). While we are currently not replacing a few legacy endpoints, these deprecations will allow us to continue building to support the latest X features into our v2 APIs. We will continue deprecating v1.1 endpoints in the future and highly suggest mapping out your existing consumption to prepare for future migrations.

In addition, we will retire legacy v2 access tiers including Essential and Elevated (for those who still have it) within the next 30 days. To maintain access to our v2 API, please log into your developer account and enroll into Free, Basic, Pro, or Enterprise. Please reach out to our developer support as needed.

We’re excited to continue building together on the next generation of X API! Thank you, X Developer Platform

API Endpoint Retirement Date Replacement
/1.1/search/tweets.json September 20th Recent Search
/1.X/users/search/ September 20th No Replacement
/1.X/geo/search/ September 20th No Replacement
/1.1/statuses/destroy November 20th Manage Tweets
/1.1/statuses/update November 20th Manage Tweets
/1.1/statuses/show November 20th Tweets Lookup
/1.1/statuses/lookup November 20th Tweets Lookup
/1.1/statuses/retweet November 20th Manage Retweets
/1.1/statuses/unretweet November 20th Manage Retweets
/1.1/statuses/update_with_media November 20th No Replacement

As part of our ongoing effort to modernize and transform our API platform, we are deprecating some of our v1.1 endpoints and asking you to migrate to the v2 equivalent (see table below). While we are currently not replacing a few legacy endpoints, these deprecations will allow us to continue building to support the latest X features into our v2 APIs. We will continue deprecating v1.1 endpoints in the future and highly suggest mapping out your existing consumption to prepare for future migrations.

In addition, we will retire legacy v2 access tiers including Essential and Elevated (for those who still have it) within the next 30 days. To maintain access to our v2 API, please log into your developer account and enroll into Free, Basic, Pro, or Enterprise. Please reach out to our developer support as needed.

We’re excited to continue building together on the next generation of X API!

Thank you,

X Developer Platform API Endpoint Retirement Date Replacement /1.1/search/tweets.json September 20th Recent Search /1.X/users/search/ September 20th No Replacement /1.X/geo/search/ September 20th No Replacement /1.1/statuses/destroy November 20th Manage Tweets /1.1/statuses/update November 20th Manage Tweets /1.1/statuses/show November 20th Tweets Lookup /1.1/statuses/lookup November 20th Tweets Lookup /1.1/statuses/retweet November 20th Manage Retweets /1.1/statuses/unretweet November 20th Manage Retweets /1.1/statuses/update_with_media November 20th No Replacement