python-oauth2 icon indicating copy to clipboard operation
python-oauth2 copied to clipboard

Twitter Three-legged OAuth Example has a flaw

Open bear opened this issue 15 years ago • 2 comments

As currently shown the example will always fail after the pincode is given with a 401 error. The reason is that oAuth v1.0a requires that the oauth_verifier parameter be present in the POST that is making the access token request.

The fix is to add the it as part of the body parameter:

resp, content = client.request(access_token_url, "POST", body="oauth_verifier=%s" % oauth_verifier)

bear avatar Aug 11 '10 09:08 bear

@joestump doc has been updated for this right?

jaitaiwan avatar Jul 29 '15 12:07 jaitaiwan

It has not.

joestump avatar Jul 29 '15 15:07 joestump