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

Application-only Authencation #354

Closed
WesleyJohnson opened this issue Jun 20, 2016 · 13 comments
Closed

Application-only Authencation #354

WesleyJohnson opened this issue Jun 20, 2016 · 13 comments

Comments

@WesleyJohnson
Copy link

Are there any plans to support app-only auth? I noticed the lib explicitly throws an error if you don't provide the access key and secret when instantiating, suggesting that Twitter requires this on all API calls, but it seems this may not be the case?

https://dev.twitter.com/oauth/application-only

@jeremylow
Copy link
Collaborator

Looking at the documentation, it doesn't seem too terrible, with the exception maybe of parsing new, possibly conflicting rate limits.

@bryanlandia
Copy link
Collaborator

bryanlandia commented Aug 24, 2016

@WesleyJohnson I just created a new branch, feature/app-only-auth on my fork at https://github.com/bryanlandia/python-twitter/tree/feature/app-only-auth.
It's working, I'm getting the higher RateLimit through that api, but the changes have no test coverage yet so I wouldn't use in production. Feel free to fork and contribute.

To use, just call Api with an additional optional parameter, application_only_auth. It defaults to False if not passed, in which case you will use the normal User Auth API.

@bear
Copy link
Owner

bear commented Aug 24, 2016

@bryanlandia say the word and I'll add you as a contributor and we can get better visibility of your branch

@bryanlandia
Copy link
Collaborator

Mike

Sure, feel free to add me.

On Aug 23, 2016, at 10:39 PM, Mike Taylor notifications@github.com wrote:

@bryanlandia https://github.com/bryanlandia say the word and I'll add you as a contributor and we can get better visibility of your branch


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #354 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABOr5w-kYLU23JV_limXxZvQiHjTEopZks5qi9kQgaJpZM4I5W6H.

@bear
Copy link
Owner

bear commented Aug 24, 2016

done!

@WesleyJohnson
Copy link
Author

Awesome, guys. I appreciate the work on this. I'll be keeping an eye out on this and hopefully be able to integrate on my next round of updates.

@jschultz
Copy link
Contributor

Is there any movement on this issue? It seems the closest any widely used Python twitter client comes to supporting application only authentication and I'm keen to use it for real. With a little experimentation I managed to make it work . Still getting some warnings.

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py:281: DeprecationWarning: unicode for buf is no longer accepted, use bytes

Is it worth my while trying to work out this warning, tidying a few things up and making a pull request, or is this already in the pipeline?

@jeremylow
Copy link
Collaborator

@jschultz I think @bryanlandia has a pretty complete implementation at bryanlandia@b6a427a. I have nothing in the works, but I'm happy to contribute or write tests against that fork.

@jschultz
Copy link
Contributor

OK thanks. I made some minor changes to @bryanlandia 's work and submitted a pull request. Still getting the deprecation warnings but suspect this is due to my local (Debian) installation and not a problem with python-twitter.

@jeremylow
Copy link
Collaborator

I saw that. Lets work on getting some tests in place before merging since it's a large change to the API.

@jschultz
Copy link
Contributor

OK I'm trying to work out your testing environment. Never done this before so please excuse my stumbling. It seems that you need to provide consumer key and secret and access token through environment variables. So I'm not clear what it is able to do when I do ./setup.py test - does it generate or retrieve some of these codes or does it just do the tests that are possible without them?

@bryanlandia
Copy link
Collaborator

bryanlandia commented Dec 12, 2016 via email

@jeremylow
Copy link
Collaborator

Lands with #423

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants