3
votes

I want to start my Dropbox-app by linking to a dropbox account as specified here: https://www.dropbox.com/developers/datastore/tutorial/js

However, dropbox won't redirect back to my website and throws "Invalid redirect_uri" I specified various redirect urls and double checked my app_key, but i could not get it to work. What am i doing wrong?

Thanks in advance!

4

4 Answers

1
votes

When I had this issue, I realized that when refreshing the dropbox app console page, it hadn't saved my domain value. Apparently, ONLY HTTPS prefixed domains will work. When I added https it worked fine and saved my value, then I was able to get that to work with my javascript, but I was wishing that I didn't have to setup a server with a cert just to test. Security security, I guess.

http://blah.com     // didn't work
https://blah.com    // did work
0
votes

Make sure the full, exact URL is registered as a redirect URI. (E.g. https://www.mydomain.com/mypage.html) The error message in the browser should tell you the exact URI that was attempted, so you should be able to match it perfectly.

0
votes

I am brand new on this and ran into the same issue today attempting to follow the "Dropbox Datastores and Drop-Ins" tutorial on net.tutsplus.com

My setup is on a local system as well with the solution in a sub directory called "todo".

By trial and error, I got through to the authorisation screen by adding this URI in the Dropbox Developer Console: "http://LH.LH/todo/" (without quotes, AND because of comment restrictions on this board, please replace "LH.LH" with "localhost")

Btw I can see in the console, that there are some other issues with the code, but I will be looking into that.

-1
votes

I'm facing the same issue. It works fine locally, but not on production. I find it to be because of the redirection URI: it adds the 'http://' bit, while you can't add this to the list of supported URI in the Dropbox app list.

Try changing the url manually from the browser, removing the http:// and leaving only the domain. Does it work? If so, you have the same problem as I do... which I still don't know how to fix :(