1

我正在尝试使用 Intuit IPP 将帐户添加到 QuickBooks Online:

https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0200_DevKits_for_Intuit_Partner_Platform/0100_IPP_.NET_DevKit/Query_Filters/QuickBooks_Online

如何获取访问令牌和访问令牌秘密?这是我的代码:

class Program
{
    static string appToken = "xxx";
    static string oAuthConsumerKey = "xxx";
    static string oAuthConsumerSecret = "xxx";

    static void Main(string[] args)
    {
        OAuthRequestValidator oauthValidator = new OAuthRequestValidator(appToken, "", oAuthConsumerKey, oAuthConsumerSecret);
        ServiceContext context = new ServiceContext(oauthValidator, appToken, "1234", IntuitServicesType.QBD);
        DataServices dataServices = new DataServices(context);


        Account account = new Account();
        account.Desc = "TEST PLEASE DELETE";
        string guid = Guid.NewGuid().ToString("N");
        guid = guid.Substring(0, 30);
        account.Name = guid;
        account.Type = Intuit.Ipp.Data.Qbd.AccountTypeEnum.Liability;
        account.TypeSpecified = true;
        account.Subtype = "Accounts Payable";
        Account resultAccount = dataServices.Add(account) as Account;

    }
}
4

2 回答 2

2

Joseph,
供将来参考和其他人参考,您的问题的文档位于此处:

IPP Oauth 文档

问候,
杰瑞德

于 2013-01-07T13:25:17.130 回答
2

我想到了。看这里的第 6 步:

http://ippblog.intuit.com/blog/2012/09/ode-to-oauth-and-rest-apis-and-how-i-love-thee-not.html

于 2013-01-06T23:42:34.487 回答