We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
PSMDanny
8 years agoExplorer | Level 3
Auth redirect_uri with variable in url
Hi I'm testing everything at the moment in a standard (stand alone) php file. Once everything is working I want to integrate everything in my php application. The issue (I think) is that my application uses a (session) token in the url. So how can I create a return uri and use that session variable. If the session variable isn't present in the url the user will get logged out and need to login again. This behavior also prevent to get the user access token.
Any way on how to do or approach this?
Thanks in advance,
Danny
2 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
As a security feature, OAuth 2 redirect URIs must be pre-registered exactly. Variables/wildcards are not supported in Dropbox OAuth 2 redirect URIs.
What you can do instead is encode the necessary information in the 'state' parameter, and decode it as necessary after the redirect back to your app, to handle it as necessary:
https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize - PSMDanny8 years agoExplorer | Level 3
Hi Greg,
Thanks for your superfast support. Really appreciate it. Okay, going to play with that suggestion.
Thanks.
Danny
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,035 PostsLatest Activity: 3 years ago
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 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!