Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Mark L.45
9 years agoCollaborator | Level 9
URI HTTPS request
Hi,
I am trying to follow this dropbox tutorial; but with success
https://blogs.dropbox.com/developers/2013/07/using-oauth-2-0-with-the-core-api/
I tried this call using the parameters shown an...
Greg-DB
Dropbox Community Moderator
9 years agoThanks! This is helpful. You're using WKWebView, and you already have didFinishNavigation implemented, which is where you'll grab the token from the URL. That is, switch to the redirect receiver version and access webView.URL inside didFinishNavigation. You can check if webView.URL is the redirect receiver, and parse the token from the URL if so.
For example, you can do something like this:
if (webView.URL?.scheme == "https" && webView.URL?.host == "www.dropbox.com" && webView.URL?.path == "/1/oauth2/redirect_receiver") {
print(webView.URL?.fragment)
// parse out access token
}
Here's how SwiftyDropbox does the parsing:
Also, don't forget to check your state parameter, which should be randomly generated each time.
Finally, note you'll also need to set disable_signup=true on /authorize to comply with Apple's rules.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!