Please forgive me if this is a dumb question, or if the answer is in the docs somewhere (I did look, honest).

I'm trying to connect a piece of desktop software to the StackExchange web service through OAuth2. I've read the docs but the problem is that what it talks about is subtly different to what parameters I have available to me.

This is what the interface looks like in my software, and the values I have entered:

[![enter image description here][1]][1]

I'm fairly sure the "Authorization Parameters" are correct, and the token URLs, but the whole thing fails. I get a dialog open asking me to login, and I can choose the Facebook option (for example) to do that. But once I enter my details to log in to Facebook, I get the following:

[![enter image description here][2]][2]

The message is "Server refused the connection"

You might think straightaway that the redirect URL is incorrect - which might be so - but most of the other web services that are predefined in my software (eg Box, Dropbox, LinkedIn, Slack, etc) all have localhost as their redirect, so I'm not convinced. 

Also, I did try using https://stackexchange.com/oauth/login_success as the redirect, but that just opens a StackExchange window, there's no indication of success, and it doesn't return me back to the original desktop tool, which is what should happen.

Anyway, if anyone has any ideas, that would be appreciated! Even just suggestions where to experiment or what section of the documentation to check would help. At the moment I just don't know where to investigate because I don't know which bit is failing, or why.

  [1]: https://i.sstatic.net/nsZ0O.png
  [2]: https://i.sstatic.net/XCTIS.png