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.

Discuss Dropbox Developer & API

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

SimpleTest waits on GetContextAsync() call

SimpleTest waits on GetContextAsync() call

psray47
New member | Level 2
Go to solution

I am attempting to retrieve the access token via the Dropbox SDK and I am using the SimpleTest program.  The browser keeps going to an error page after log in and the progress in HandleOAuth2Redirect never gets past the call to http.GetContextAsync().  Any ideas what I am missing?

Note the error is a 'This site can't be reached  The connection was reset' page.  The url appears to contain a valid access_token and other valid data but I am not able to collect it programmatically because the listener does not seem to respond?

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Thanks! The LoopbackHost in the sample code as provided is "http://127.0.0.1:52475/", not "https://localhost/", so it does sound like that was a change you made. 

 

I would not expect "https://localhost/" to work, as you wouldn't normally have an SSL/TLS certificate for localhost. Please trying switching that back to the original value and try again.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution

We'll be happy to take a look at this, but we could use some more information. Can you let me know:

  • What version number of the SDK are you using?
  • Have you made any modifications to the SimpleTest example?
  • Do you get any error or output in the console in Visual Studio?
  • What's the full URL of the page with the "This site can't be reached" error? (Be sure to redact any access token though.)

Thanks!

psray47
New member | Level 2
Go to solution

Thanks for the quick response.  The version is 6.1.0 though it is the same in 4.9.  

 

I have made no modifications other than to include my ApiKey value over the xxxxx in the ApiKey assignment and set the LoopbackHost to "https://localhost/" (not sure if that was a change).

Only outputs are typical symbols loaded messages.  No other errors.

URL:  https://localhost/authorize#uid=2043413648&access_token=xxxxx&token_type=bearer&state=01e0755450044ccc86972ed65edbbc7f&scope=account_info.read+account_info.write+files.content.read+files.content.write+files.metadata.read+files.metadata.write&account_id=dbid%3AAABY27bg64bgzUqQ4xF8XUoxciuqDZAeIdI

Greg-DB
Dropbox Staff
Go to solution

Thanks! The LoopbackHost in the sample code as provided is "http://127.0.0.1:52475/", not "https://localhost/", so it does sound like that was a change you made. 

 

I would not expect "https://localhost/" to work, as you wouldn't normally have an SSL/TLS certificate for localhost. Please trying switching that back to the original value and try again.

psray47
New member | Level 2
Go to solution

Thank you very much Greg.  Adding the ipaddress and the port number with authorization in the console worked.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    psray47 New member | Level 2
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?