-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I trying yo use the api for 500px but i have some troubles, in the first step all is fine, i can generate OAuthHandler handler and get the url authorization then redirect the user to it, but when 500px.com redirect to my app and i try to create again the OAuthHandler next i try to pass the oauth_verifier to new handler but the 500px response me "HTTP Error 401: Unauthorized" and i don't know why
class FiveHundredpx(web.RequestHandler):
def get(self):
oauth_token = self.get_argument('oauth_token', None)
oauth_verifier = self.get_argument('oauth_verifier', None)
if not oauth_verifier:
handler = OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
token = handler.get_request_token()
self.set_cookie('oauth_token', token.key)
self.set_cookie('oauth_token_secret', token.secret)
self.redirect(handler.get_authorization_url()+'&display=popup')
else:
handler = OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
handler.set_request_token(self.get_cookie('oauth_token'), self.get_cookie('oauth_token_secret'))
handler.set_access_token(oauth_token, self.get_cookie('oauth_token_secret'))
handler.get_access_token(oauth_verifier)
unauthorized_api = FiveHundredPXAPI(handler)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels