Note that there are some explanatory texts on larger screens.

plurals
  1. POProvide callback function to OAuth when using python-oauth2
    primarykey
    data
    text
    <p>I'm using <a href="https://github.com/simplegeo/python-oauth2" rel="nofollow">python-oauth2</a> to authenticate API calls to Dropbox's API. </p> <p>There are two problems I'm having: </p> <ol> <li><p>I don't know how to provide a callback function to OAuth. I tried making the request as follows:</p> <pre><code>resp, content = client.request(request_token_url,\ "POST",body=urllib.urlencode({'oauth_callback':callbackURL})) </code></pre> <p>However, the function at <code>callbackURL</code> is not called.</p></li> <li><p>At the moment, I've just modified the example code given in the <a href="https://github.com/simplegeo/python-oauth2/blob/master/README.md" rel="nofollow">README</a> for <code>python-oauth2</code>, and I've managed to redirect the user to the Dropbox authentication page. However, I've written no code to explicitly sign my requests. Is that being done by the module, or are the requests I am making just unsigned? If its the latter, I'm really confused as to how things are working. </p></li> </ol> <p>Help much appreciated. Thanks!</p> <p>--Edit--</p> <p>So I was reading the API docs, and the authorization URL takes two parameters - one is the <code>access_token</code> and the second is <code>oauth_callback</code>. I managed to created a URL that had these two parameters, and now, once the user authenticates my app, they are successfully redirected to my website. However, this seems like a very crude hack, and I'd love to learn to do this in a better way. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload