Chris Snow
Chris Snow

Reputation: 24606

OAUTH 1.0a without a consumer service

I would like to create an android application that stores data on dropbox. There are no other services involved. There is just the android app and dropbox.

Will the dropbox API support this use case? My understanding is that oauth needs to return an access token to a consumer url, which isn't available for my use case?

Many thanks.

Upvotes: 0

Views: 287

Answers (1)

Jon Susiak
Jon Susiak

Reputation: 4978

After obtaining a request token, you will need to get the user to visit the Dropbox authorize url, and then return to your application and inform you once they have authorized your application. For example your instructions to the user could be:

Please open a browser to https://dropbox.com/1/oauth/authorize?oauth_token=mADeuPReq35Tt0Ken and press the Allow button. Then return to this app and press the enter button below.

Obviously replace mADeuPReq35Tt0Ken with the request token you obtained from the Dropbox request token url.

By omitting the oauth_callback parameter, Dropbox will not redirect the user anywhere after they have authorized your app. Once the user tells your app that it has been authorized (by pressing a button in your app as in the example above or something similar), you can then proceed to obtain an access token and access token secret by calling the Dropbox access token endpoint with a signed request using the request_token and request_token_secret you obtained initially.

Details can be found here.

Upvotes: 1

Related Questions