-
Notifications
You must be signed in to change notification settings - Fork 198
Error in check_token_v2()
: ! A bearer token
is needed for this endpoint.
#760
Comments
Hi Andreas, there are several points I think are worth addressing in your post. The latest development of rtweet is in the devel branch currently at 1.1.0.9003 version number. This is to make it easier for people to read the documentation close to what it is on CRAN and keep the devel branch "hidden" (it is documented in the contributing file). I mention this in case you want the latest features too and not only a working Yes, it was cool as long as it worked until last November. The API no longer worked. I don't have the energy and time to support old APIs when it is clear that it won't be supported in the future, so rtweet had to switch to the new API v2 which has different requirements, works different and returns different output. See this post where I explain what I am working on, and some decision I'm facing. The bearer token was the easiest and fastest way to implement support for the stream endpoints in API v2 with existing code. I am still struggling authenticating a user via an app with the OAuth2 as implemented by Twitter, so that users can use their own account to use the API. That feature will come, but according to this table, Twitter only allows using the bearer token for this endpoint. It might change in the future or it might not. But you will need to use the bearer token for now. The documentation you quote is from an internal function. I don't see any mention to distinction of authentication mechanisms. In rtweet all arguments for authorization codes are named The default I hope this helps clarify the problems around the token and the streaming endpoints. I went to see the issues at Twitmo:
|
Hi Lluis, thanks for taking the time to write such a thorough response and also going through Twitmos issues.
I'm still not sure I get this right. There is currently no way to give users API access on behalf of a Twitter account (like in rtweet v0.7) because Twitters V2 API doesn't allow this? I guess
This is great news for those with academic research access.
Don't worry about that, this is more likely related to the
This was never a big problem, since I've used that regex you had in earlier rtweet versions to throw out bad lines. I think later on, bad lines weren't even written to the json file and thrown out upon streaming if I remember correctly. What is currently an issue, is that parsing doesn't work because there seems to be changes in rtweets
The way CRAN handles downstream dependency management (by forcing downstream dependencies to work the the latest upstream package version, not allowing to lock to lower versions) code breakage of downstream dependencies is bound to happen all the time with R packages anyway. You can dribble around it but ultimately it's not your fault. |
I am very happy to talk with other maintainers depending on rtweet! I hoped that the update to v1.0.0 would spark some conversations: I want to improve how rtweet handles the API but at the same time not include too much to make redundant other packages (I must confess I have spent almost no time learning what they do).
Let me know if you have more feedback, I'm very happy to hear it. My general idea of rtweet is to have a lean, consistent interface with Twitter API with sensible, rectangular data handling the authentications as easier as I can. In the future I will probably drop functions requiring dependencies not to the core of the package (ggplot2, igraph, magick, webshot, maps?) or that are more about processing the data, but I might incorporate some functions to create/explore network relationships through the API (ie, combining different rtweet functions, vectorizing some others, ...). |
Well, all of this is moot, see the new announcement: To use the API all users should pay. |
Well damn, that was what I meant with "shifting priorities" at Twitter ... EM bought a cashflow negative company at an inflated price, so the free lunch policy was bound to end. |
I'm about to release a version (check the master/NEWS file). I'm closing this question as I've changed the wording of the new endpoints. |
After loading the latest devel version (
‘1.1.0.9001’
), I'm wondering if 'painless' streaming without providing a bearer token is still possible with this package.One of the greatest features of this package was, that just using a regular account, you could authenticate and stream tweets.
Since you deprecated
stream_tweets()
in favor offiltered_stream()
I'm wondering of this is even still possible.I'm confused. The documentation says
token | Expert use only. Use this to override authentication for a single API call. In most cases you are better off changing the default for all calls. See auth_as() for details.
suggesting that bearer tokens are optional.Am I missing something here or are bearer tokens now always required?
Also I have minor nitpick, for the time being that parsing is not supported, I would not set the default parameter
parse
infiltered_stream()
toTRUE
.The text was updated successfully, but these errors were encountered: