0

I want the Dropboox API to generate URL like

https://www.dropbox.com/1/oauth2/authorize?state=<STATE>&redirect_uri=<URI>Connectors&response_type=code&client_id=<client_id>

But using the API, I am getting below URL --

https://www.dropbox.com/1/connect?locale=en_IN&k=<k>&n=0&api=2&state=<state>

The above URL won't redirect with "code" i.e. the OAuth code to be used later on by another API to access dropbox folders on behalf of the user.

It is possible to get Access token using API, which can be used locally on the phone for operations like view,select, upload, download. But for these i have a server which will be managing these tasks on behalf of the user.

Is there a way to implement this using Dropbox APIs and without using WebView?

MashukKhan
  • 1,946
  • 1
  • 27
  • 46

1 Answers1

0

The second URL, with /connect, is just meant to be used as part of the official Dropbox SDKs. If you're using one of those, you should just use the provided authorization flow as documented.

If you're not using an official SDK, you should use the normal /oauth2/authorize flow as documented here:

https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize

That would give you an access token you can store and re-use for API calls.

One way or another though, the user does need to interactively approve your app (either via a web page or an official Dropbox app) at least once for your app to receive an access token for that user.

Greg
  • 16,359
  • 2
  • 34
  • 44