Dwolla API Key、Client_id 和 Client_Secret 有什麼區別? (What is the different between Dwolla API Key, Client_id & Client_Secret?)


問題描述

Dwolla API Key、Client_id 和 Client_Secret 有什麼區別? (What is the different between Dwolla API Key, Client_id & Client_Secret?)

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 ?


參考解法

方法 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

(by Shubhajyoti GhoshGordon Zheng)

參考文件

  1. What is the different between Dwolla API Key, Client_id & Client_Secret? (CC BY‑SA 3.0/4.0)

#oauth-2.0 #dwolla #api-key #payment-gateway






相關問題

OAuth2 用戶映射和丟失我的 Cookie (OAuth2 User Mapping and Loosing my Cookies)

如何在打開 Facebook 登錄對話框之前告訴 iPhone 應用用戶會發生什麼 (How to tell an iphone app user what will happen before opening Facebook login dialogue)

帶有 spring-security 的 OAuth2 - 通過 HTTP 方法限制 REST 訪問 (OAuth2 with spring-security - limit REST access by HTTP method)

帶有Phonegap 2.3.0的Facebook oAuth沒有在成功url返回令牌作為url參數 (Facebook oAuth with Phonegap 2.3.0 not returning token as url param at success url)

Dwolla API Key、Client_id 和 Client_Secret 有什麼區別? (What is the different between Dwolla API Key, Client_id & Client_Secret?)

Linkedin 應用程序具有 OAuth 用戶令牌和 OAuth 用戶密鑰,它們會過期嗎? (Linkedin Application has OAuth User Token and OAuth User Secret, Do they Expire?)

OAuth2:保護非用戶資源 (OAuth2: Protecting non-user resources)

IOS的foursquare oauth2 (foursquare oauth2 for IOS)

Spring Boot 2 Oauth 如何實現隱式代碼流 (Spring Boot 2 Oauth how to implement Implicit Code Flow)

FusionAuth - 基於邀請的用戶登錄與社交登錄 (FusionAuth - Invite based user on-boarding with social logins)

為什麼每次發送請求時都刷新訪問令牌是個壞主意? (Why is it a bad idea to refresh access token every time when I sent request?)

如何配置必須使用“密碼”授權類型從授權服務器請求令牌的客戶端 Java 應用程序? (How do I configure a client Java application which must request a token from an authorization server using a 'password' grant type?)







留言討論