"Invalid application credentials" in sandbox refresh token


(llr) #1

I’m trying to refresh authorization per the instructions here: https://docsv2.dwolla.com/#refresh-authorization.

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d '{"client_id":"mHnxNFG5nzegNr7KTPcZ0pXsDiAMtmD7GnFdl4LTwIt80xQL6a", "client_secret":"PQRzAjTEV8oJ0ye1tM4qH28iFBwJQnnGxT3EHJ9GXjeBTN1ILH", "refresh_token": "wyR9HWyOAyyipJdh1mAG1oto0lbAOyQg8M7bKbzNhEvUvpUR3w", "grant_type":"refresh_token"}' https://uat.dwolla.com/oauth/v2/token

response:
{“error”:“access_denied”,“error_description”:“Invalid application credentials.”}


(Stephen Ausman) #2

Hey llr,

It looks like the content-type is different that what’s in the request body. If you change content-type to application/json it should work. Or you can change the body to be application/x-www-form-urlencoded instead of json, e.g. client_id=...&client_secret=...&refresh_token=...&grant_type=refresh_token.

Let me know if you run into any issues.


(llr) #3

Ah yes. Thank you.