Pregunta

How to work with Dwolla API which required Client_id & Client_Secret

https://www.dwolla.com/oauth/rest/users/{account_identifier}?client_id={client_id}&client_secret={client_secret}

I already register Application. And Got Key and Secret

But when I call above described API Endpoint via Fiddler. Got bellow response.

{"Success":false,"Message":"Invalid application credentials.","Response":null}

Note: I tested Client_id = API Key / Client_id = Application Key. But the response remain same. What is the problem ?

¿Fue útil?

Solución

The client_id is just another name for the API/Application Key, which identifies your application. The client/application secret is a string that functions as a password for your application. Just like a password, you should never give out your application secret; and if it's ever compromised, let us know immediately and we'll generate a new key/secret pair for you.

About your failed request: Try encoding your application key and secret. If special characters aren't escaped from the URL, the request will be interpreted differently from what you intend.

You can quickly encode the two strings from your Javascript console:

var key = "EUFH378&36%394749D\DWIHD";
encodeURIComponent(key);

Result: "EUFH378%2636%25394749DDWIHD"

var secret = "WOIDJ38&IDI\DK389DDDDD";
encodeURIComponent(secret);

Result: "WOIDJ38%26IDIDK389DDDDD"

And place their encoded equivalents back into your request URL:

https://www.dwolla.com/oauth/rest/users/gordon@dwolla.com?client_id=EUFH378%2636%25394749DDWIHD&client_secret=WOIDJ38%26IDIDK389DDDDD

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top