We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

vladabuba's avatar
vladabuba
Explorer | Level 4
6 years ago

Dropbox SDK windows, redirect to localhost after successful authorization issue

Using DropboxOAuth2Helper and samples from Dropbox SDK for Windows, I had successfully implemented authorization (and I get valid access token). Part of this process is redirection to localhost, after Allowing application access with Dropbox, with response and access token in fragment. In this case it shows that application waits for response on port which is registered as redirecturi on Dropbox.

Only issue I got is that I'm left with window and "Unable to connect" message.

Again to mention, I got access token, url_with_fragment parameter, authentication is successful, so that is all a ok.

Problem is just leftover message and window with this ugly message.

User can close this window manually, but we do not find this nice nor professional.

Do you have any suggestion how to get rid of this message (or this window or tab) after successful authorization?

 

1. Before authorization2. After authorization

  • [Cross-linking for reference: https://stackoverflow.com/questions/53669144/dropbox-sdk-redirect-to-localhost-after-successful-authorization ]

    That 127.0.0.1:... page is a being served by the local web server that you control, for the purpose of receiving  the access token. Once you receive the access token from the request with the url_with_fragment parameter, you can respond with an HTTP response containing whatever you'd like to show the user at that point. E.g., you can serve a basic HTML page showing a success message, telling the user they can close the tab/window, etc.. The error message here seems to just be indicating that the local web server isn't currently issuing a valid response.

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

    [Cross-linking for reference: https://stackoverflow.com/questions/53669144/dropbox-sdk-redirect-to-localhost-after-successful-authorization ]

    That 127.0.0.1:... page is a being served by the local web server that you control, for the purpose of receiving  the access token. Once you receive the access token from the request with the url_with_fragment parameter, you can respond with an HTTP response containing whatever you'd like to show the user at that point. E.g., you can serve a basic HTML page showing a success message, telling the user they can close the tab/window, etc.. The error message here seems to just be indicating that the local web server isn't currently issuing a valid response.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
325 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!