cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Known issues updated. Learn more

February contest: Post your Paper workflow to win a Dropbox t-shirt and tote bag!
Highlighted

Dropbox SDK windows, redirect to localhost after successful authorization issue

Level 4

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?

 

Before.png1. Before authorizationAfter.png2. After authorization

1 Accepted best answer

Accepted Solutions

Re: Dropbox SDK windows, redirect to localhost after successful authorization issue

Dropboxer

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

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.

Reply
Loading...
1 Reply

Re: Dropbox SDK windows, redirect to localhost after successful authorization issue

Dropboxer

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

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.

Reply
Loading...
API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post