We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Julie P.22
11 years agoNew member | Level 1
URI misatch
Hello,
I code a web service in .net/C# and I use the oauth2.
I succeed to do the authorization :
https://www.dropbox.com/1/oauth2/authorize
with params : client_id, state, response_type and redirect_uri
My redirect_uri is a call to another part of my web service.
Inside, I call the next step :
https://api.dropbox.com/1/oauth2/token
with params : code, grant_type, client_id, client_secretand redirect_uri
It fails. The error message is "redirect_uri mismatch". I've checked multiple times and it is the same in my request and in my dropbox app.
I use two differents uri for the first (authorize) and second (token) request (both saved in my dropbox app), is it the problem?
If I use the same uri, how can I distinct the first and second callback ?
Thanks to your help.
2 Replies
Replies have been turned off for this discussion
- Julie P.2211 years agoNew member | Level 1
Ok, I've understood...
I can use differents redirect_uri, but...
for the "https://www.dropbox.com/1/oauth2/authorize", I must to wait for the callback on redirect_uri.
for the "https://api.dropbox.com/1/oauth2/token", I must do a GetResponse() not wait for the callback over the redirect_uri.
Why must I add a redirect_uri on the second call if it isn't used ?
Thank you to enlighten me.
- Greg-DB11 years ago
Dropbox Community Moderator
The
redirect_uriparameter on /oauth2/token is documented as:Only used to validate that it matches the original
/oauth2/authorize, not used to redirect again.I believe that's a security feature of OAuth 2, from the spec here:
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!