Joseph Anderson
Joseph Anderson

Reputation: 4144

OAuthRequestValidator Access Token and Access Token Secret

I am trying to add an account to QuickBooks Online using 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

How do I get the access token and the access token secret? Here is my code:

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;

    }
}

Upvotes: 1

Views: 1399

Answers (2)

Jarred Keneally
Jarred Keneally

Reputation: 1931

Joseph,
For Future reference and for others the documentation for your question is located here:

IPP Oauth Documentation

regards,
Jarred

Upvotes: 2

Related Questions