2013-07-22 80 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

感谢您的帮助。我编辑了这个问题,因为我仍然有问题。 –