Токен доступа OAuthRequestValidator и секрет токена доступа

Я пытаюсь добавить учетную запись в QuickBooks Online с помощью Intuit IPP:

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;

    }
}

person Joseph Anderson    schedule 06.01.2013    source источник
comment
Вы нашли решение для этого? у меня такая же проблема   -  person Cyberdrew    schedule 24.08.2015


Ответы (2)


Я понял. Посмотрите на шаг 6 здесь:

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

person Joseph Anderson    schedule 06.01.2013

Джозеф,
Для справки в будущем и для других документация по вашему вопросу находится здесь:

Документация по Oauth IPP

С уважением,
Джарред

person Jarred Keneally    schedule 07.01.2013