Showing posts from May, 2013

Dropbox OAuth in Flask

Yesterday I was trying to add a Dropbox related functionality to my home-brew project, which is build using a great and lightweight Python framework Flask, and I had some issues, solution to which will be described in this blog post.

As I have already added Twitter integration using Flask-OAuth extension, I thought it will be relatively easy to do the same for the Dropbox Core API Authentication Method. I was wrong :). You see, after some debugging, I have decided to do a rather unusual thing for me: read very carefully the documentation. And then I have found out that the Drobpox API´s are based on OAuth 1.0 specification, when the Flask-OAuth supports only the 1.0a version. What is the difference? A very substantial one, in my opinion, for a "a" version.

In 1.0a version, the oauth_callback parameter is passed in the first step of the flow, Consumer Obtains a Request Token. The Service Provider will redirect the User back when the Obtaining …