cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Auth redirect_uri with variable in url

Auth redirect_uri with variable in url

PSMDanny
Explorer | Level 3

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 2

Greg-DB
Dropbox Staff
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

PSMDanny
Explorer | Level 3

Hi Greg,

Thanks for your superfast support. Really appreciate it. Okay, going to play with that suggestion.

Thanks.
Danny

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    PSMDanny Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?