cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox SDK windows, redirect to localhost after successful authorization issue

Dropbox SDK windows, redirect to localhost after successful authorization issue

vladabuba
Explorer | Level 4
Go to solution

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 authorization1. Before authorization2. After authorization2. After authorization

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

[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.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

[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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?