Dwolla exchange code for access_token giving (500) internal server error

StackOverflow https://stackoverflow.com/questions/13904132

  •  09-12-2021
  •  | 
  •  

Вопрос

I'm on the final OAuth step for Dwolla, exchanging the code for the access_token, however it's giving me back a (500) internal server error and no error message, so I have nothing to go off of.

My url looks like this:

https://www.dwolla.com/oauth/v2/token?client_id=mykey&client_secret=mysecret&grant_type=authorization_code&code=6HjhJyVAa+iRdjahIWdbu8FOl30=

For doing the GET, all I'm doing is:

public static string Get(string url) {
            using (WebClient client = new WebClient()) {
                //client.Headers.Add("Content-Type", "application/json");
                return client.DownloadString(url);
            }
        }

I've tried with and without the Content-Type header but it errors either way.

I'm confident that the code is correct, because if I change the value then it returns back that the code is invalid.

Any ideas?

Это было полезно?

Решение

I wasn't passing in the redirect url, which they claim is optional but really isn't, it'll give this useless error if not passed in.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top