-
Notifications
You must be signed in to change notification settings - Fork 100
Support for Application-only ('bearer') authentication for higher quota limits #237
Comments
Here's a gist showing end-users how they can hack support for Application-only ('bearer') authentication on top of You can then create a new ...I can probably find time to hack this a bit further into a proper PR if there's interest? |
Thank @rtyley, PRs are always appreciated! Also, in twitter4s 6.0 we will have a client dedicated for app authentication -- it is probably what you are looking for: https://github.com/DanielaSfregola/twitter4s/blob/master/src/main/scala/com/danielasfregola/twitter4s/TwitterAuthenticationClient.scala I'll try to cut the release version 6.0 -- people have been asking for its release for a while now! Cheers, |
ooh, interesting - I was looking at the code around the new |
Correct! If you see https://github.com/DanielaSfregola/twitter4s/blob/master/src/main/scala/com/danielasfregola/twitter4s/http/clients/authentication/oauth/TwitterOAuthClient.scala you will see the endpoints for Maybe all we need to do is to expand the soon-to-be-released |
Note that the constructor-overriding-hack in this gist no longer works with @DanielaSfregola, you did mention that |
At present there is no way to pass a Happy to do a patch and make those constructors public again. Would this work? Cheers, |
…hack Following on from DanielaSfregola#237 (comment) this is the smallest change required to get the constructor-overriding hack in this gist to work: https://gist.github.com/rtyley/dc341992a6104f4b499834fd2d10dfad
Thanks @rtyley for the PR - which I have released in twitter4s 6.0.1 Hopefully, we will add support for the application-only support soon, but this should at least allow you to keep you going until then! Cheers, |
As an FYI: the workardoung still works like a charm. Just create the file from the gist (under the correct package) and this will get you going:
(Thanks for this library @DanielaSfregola ! :)) |
@DanielaSfregola would you be Ok if we did the same hack with the streaming client? (From a cursory glance changing the visibility of a constructor, as @rtyley did in #239, should work the same) |
That makes sense. Might find the time to do a proposal in a PR :) |
The Twitter API offers applications the ability to issue authenticated requests on behalf of the application itself (as opposed to on behalf of a specific user) - these requests are authenticated using bearer tokens and often have much higher API quota limits (eg on the search tweets endpoint you get 450, rather than 180, requests per 15 minute window):
twitter4s
is an excellent library, although unfortunately it currently only supports user-auth so far as I can see - would it be possible to add app-auth for increased API quota?See also: the PR adding application-only authentication to
Twitter4J
.The text was updated successfully, but these errors were encountered: