Forum Discussion

loody's avatar
loody
Explorer | Level 3
8 years ago

Oauth2.0 login with android webview.

In my app, I use Oauth 2.0 flow with webview in andorid.
according to google announcing, Google webview log-in is prohibited from April 20.
I want to use Dropbox log-in on browser without dropbox sdk.
but Oauth2.0's redirect url is only possible starts with "https://"
Is there any way to use Oauth2.0 flow in android browser?
for example, how can I use REDIRECT URL without "https://".
Or  can I use the SDK URL(https://www.dropbox.com/1/connect?locale=en_CA&k=my app key&n=0&api=1&state=oauth2%3Aab6c32abc574634547a4ac9f20b7f854)
without Dropbox SDK.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    If you're implementing the OAuth app authorization flow yourself without using an SDK, you should use the standard documented OAuth endpoints. That is, you should use /oauth2/authorize instead of /connect, as /connect isn't documented and only meant for use in the official SDKs.

     

    When using the OAuth 2 app authorization flow, your redirect URI doesn't technically need to be https://. You can use http:// redirect URIs on localhost only (e.g., for testing) or a custom local URL scheme (like the SDK does). 

     

    Also, if you are building on Android, we do recommend using the official API v2 Java SDK. There's a sample Android app you can refer to. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 9 hours ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!