Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Kevin P.22
10 years agoNew member | Level 1
In PHP : How to detect that DropBox won't hang?
Hi
I'm following the example PHP for authentication - no problem.
- you create a link for them to go to DropBox page
- They "allow" and are given a authorization code
- they paste that into your awaiting code
- you can the call : list($accessToken, $dropboxUserId) = $webAuth->finish($authCode); to obtain $accessToken.
BUT if the user DOES NOT authenticate and obtain a valid authorisation code from the dropbox page -
and they paste junk into your code AND you then call the above list(....
DropBox does not return at all and a blank screen is displayed.
I've tried everything to detect that it's OK to make the call - but can't find anything that would indicate $authCode is not genuine and a crash will follow.
Any ideas....???
Thanks
1 Reply
Replies have been turned off for this discussion
- Steve M.10 years ago
Dropbox Staff
I assume that when you pass an invalid authorization code to
finish, it raises an exception. So wrap the call in atry/catchand handle that exception.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!