Forum Discussion

IQCloud's avatar
IQCloud
Explorer | Level 3
5 years ago

OAuth2 Redirect Url

Hello there,

 

For the Oauth2 bewlow

https://api.dropbox.com/1/oauth2/authorize?response_type=code&client_id=zzzzzzzzzzz&redirect_uri=https://localhost:44332/Login?Cloud=DROP&ClientId=393903

 

It is saying ClientId is invalid. 

The app has the same redirect url: https://localhost:44332/Login?Cloud=DROP&ClientId=393903

 

Could you please advise wether it is possible to add extra parameters and only the first one is accepted (Cloud) so far.

 

Error is:

More details for developers

unknown field "ClientId"

 

Please let me know!

 

Thanks

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    It sounds like you're not URL encoding the 'redirect_uri' value, and so the URL parameters on your redirect URI are being sent as actual URL parameters to the Dropbox /oauth2/authorize app authorization page itself, which does not expect those parameters.

     

    You'll need to URL encode your 'redirect_uri' value. For example, for the sample you included here, that would be:

     

    https%3A%2F%2Flocalhost%3A44332%2FLogin%3FCloud%3DDROP%26ClientId%3D393903
    

     

    Also, note that per the documentation, the app authorization page should be accessed at https://www.dropbox.com/oauth2/authorize (not on api.dropbox.com).

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers806 PostsLatest Activity: 6 hours ago
217 Following

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!