1

如何使用需要 Client_id 和 Client_Secret 的 Dwolla API

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

我已经注册了Application。得到了钥匙秘密

但是当我通过Fiddler调用上述 API Endpoint 时。得到以下回应。

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

注意:我测试了 Client_id = API Key / Client_id = Application Key。但反应保持不变。问题是什么 ?

4

1 回答 1

1

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

于 2013-07-10T20:15:21.143 回答