2013-07-22 81 views
0

我有一個關於忒API的問題。我想用這個API第一次連接。我正在使用.NET SDK。我將通過本教程:http://goo.gl/PzIzoa。我不知道我必須傳遞參數issuerId和subject(步驟1.b)。第一次嘗試時,我將它們留空,並且捕獲InvalidTokenException。 我必須通過哪些論據才能使其發揮作用?忒 - 第一連接

編輯: 感謝您的幫助,現在我通過你的web應用程序的連接。 現在我想用我的應用程序連接。我寫了這個代碼:

string certificateFile = "C:\\OpenSSL-Win32\\bin\\testapp1.crt"; 
string password = "xxx"; 
X509Certificate2 certificate = new X509Certificate2(certificateFile, password); 
string consumerKey = "xxx"; 
string consumerSecret = "xxx"; 
string issuerId = ""; 
string subject = ""; 
SamlRequestValidator val = new SamlRequestValidator(certificate, consumerKey, consumerSecret, issuerId, subject); 

調用SamlRequestValidator構造我趕上InvalidTokenException後。我究竟做錯了什麼?我需要做些什麼才能使它工作?

回答

1

請看看下面的鏈接。

https://developer.intuit.com/docs/0020_customeraccountdata/007_firstrequest

您可以使用apiexplorer工具來測試,而無需使用的devkit這些API調用。 (這將確保您的OAuth按鍵做工精細)

https://developer.intuit.com/apiexplorer?apiname=CustomerAccountData

您可以參考以下.NET示例應用程序也是如此。

https://developer.intuit.com/docs/0020_customeraccountdata/devkits/285.net_sample_app_for_cad_services

讓你得到有關這一過程的任何問題,我知道。

謝謝

+0

謝謝你的迴應。但我也有apiexplorer工具的問題。我沒有任何帶* .p12擴展名的文件。我怎麼才能得到它?在生成證書期間,它不在輸出中。 –

+0

我已經分享了使用你的.crt和.key文件創建.p12文件的鏈接。請按照步驟操作並生成.p12文件並在apiexplorer中使用。 https://developer.intuit.com/docs/0020_customeraccountdata/Step_2:_Create_Your_X.509_Certificate –

+0

感謝您的幫助。我編輯了這個問題,因爲我仍然有問題。 –