Muhammad Alkarouri
Muhammad Alkarouri

Reputation: 24672

OAuth2 client that works on App Engine

Can anyone advice me on a good library or else how to go about having a Python appengine based application using OAuth to authenticate to another server?

I have an application on appengine that expects user input. I would like the user to be able to upload an image, which I would put in imgur.com and would be able to show to the user back on my page. To be able to do that, I need to be able to authenticate to api.imgur.com hence the question.

Upvotes: 5

Views: 3595

Answers (3)

stannie
stannie

Reputation: 91

I believe the simplegeo oauth2 does not play well with GAE. Mike Knapp's library on GitHub is nice and simple, no install needed.

Upvotes: 1

systempuntoout
systempuntoout

Reputation: 74134

Have a look to python-oauth2 project.

A Client example:

import oauth2 as oauth

# Create your consumer with the proper key/secret.
consumer = oauth.Consumer(key="your-twitter-consumer-key", 
    secret="your-twitter-consumer-secret")

# Request token URL for Twitter.
request_token_url = "http://twitter.com/oauth/request_token"

# Create our client.
client = oauth.Client(consumer)

# The OAuth Client request works just like httplib2 for the most part.
resp, content = client.request(request_token_url, "GET")
print resp
print content

Upvotes: 4

Jim Geovedi
Jim Geovedi

Reputation: 321

maybe you can use imgur-api, http://code.google.com/p/imgur-api/wiki/ImageUploading

Upvotes: 0

Related Questions