You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
FSUInnovation
5 years agoExplorer | Level 4
redirect_uri mismatch with unknown cause php
I was using my php curl to request a token from the api. I set up my parameter array correctly. However, I get this error in return :{"error_description": "redirect_uri mismatch", "error": "invalid_g...
- 5 years ago
Regarding your first question, yes, the "redirect_uri" value you specified on /oauth2/authorize should be the same "redirect_uri" value you then send to /oauth2/token.
I'm not sure I understand your second question though. You can re-use your redirect URI for each authorization, but note that each particular authorization code you get back can only be used once. You should exchange each authorization code via /oauth2/token once. The /oauth2/token endpoint will return an access token that you can store and re-use to make API calls for that user without further manual user intervention though.
FSUInnovation
Explorer | Level 4
So Simply Take the redirect uri I used when I sent the user to the oauth path earlier and refactor my php page to use that page again? Will I be able to supply a parameter of some kind so that I can reuse that redirect uri without repeating the previous step in my auth process again?
Greg-DB
5 years agoDropbox Staff
Regarding your first question, yes, the "redirect_uri" value you specified on /oauth2/authorize should be the same "redirect_uri" value you then send to /oauth2/token.
I'm not sure I understand your second question though. You can re-use your redirect URI for each authorization, but note that each particular authorization code you get back can only be used once. You should exchange each authorization code via /oauth2/token once. The /oauth2/token endpoint will return an access token that you can store and re-use to make API calls for that user without further manual user intervention though.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 3 years agoIf 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!