Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8957315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:57:43+00:00 2026-06-15T14:57:43+00:00

hi all am working on a project that involves Fetching data from Intuit Anywhere.The

  • 0

hi all am working on a project that involves Fetching data from Intuit Anywhere.The process works fine when a url signed with Oauth is send as request.Can some one help me how to add xml request to the body of IConsumerRequest.

  OAuthConsumerContext consumerContext = new OAuthConsumerContext
                {
                    ConsumerKey = "consumerkey",
                    SignatureMethod = SignatureMethod.HmacSha1,
                    ConsumerSecret = "consumersecret"
                };

  OAuthSession oSession = new OAuthSession(consumerContext, "https://oauth.intuit.com/oauth/v1/get_request_token",
                                        "https://workplace.intuit.com/Connect/Begin",
                                        "https://oauth.intuit.com/oauth/v1/get_access_token");

                oSession.ConsumerContext.UseHeaderForOAuthParameters = true;
                oSession.AccessToken = new TokenBase
                {
                    Token = Session["accessToken"].ToString(),
                    ConsumerKey = "consumerkey",
                    TokenSecret = Session["accessTokenSecret"].ToString()
                };

                IConsumerRequest conReq = oSession.Request();
                 string body = @"<?xml version=""1.0"" encoding=""utf-8""?>
    <AccountQuery xmlns=""http://www.intuit.com/sb/cdm/v2"">
      <ListIdSet>
        <Id idDomain=""QB"">143</Id>
        <Id idDomain=""QB"">130</Id>
      </ListIdSet>
    </AccountQuery>";
                    conReq = conReq.Get();
                conReq = conReq.ForUrl("https://services.intuit.com/sb/account/v2/536779769");
  conReq.RequestBody=body;
                   try
                {
                    conReq = conReq.SignWithToken();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                string header = conReq.Context.GenerateOAuthParametersForHeader();
                string serviceResponse = conReq.ReadBody();

i get an error Cannot send a content-body with this verb-type.Can someone point me what the error is or Is it possible to do the same with a web request? Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:57:44+00:00Added an answer on June 15, 2026 at 2:57 pm

    this worked.Below is the example code i got from intuit forums-
    https://idnforums.intuit.com/messageview.aspx?catid=86&threadid=18870&enterthread=y

     //using DevDefined.OAuth.Consumer;
    //using DevDefined.OAuth.Framework;
    
    protected void GetBalanceSheet()
    {
        OAuthConsumerContext consumerContext = new OAuthConsumerContext
        {
            ConsumerKey = ConfigurationManager.AppSettings["consumerKey"].ToString(),
            SignatureMethod = SignatureMethod.HmacSha1,
            ConsumerSecret = ConfigurationManager.AppSettings["consumerSecret"].ToString()
        };
    
        OAuthSession oSession = new OAuthSession(consumerContext, "https://oauth.intuit.com/oauth/v1/get_request_token",
                                "https://workplace.intuit.com/Connect/Begin",
                                "https://oauth.intuit.com/oauth/v1/get_access_token");
    
        oSession.ConsumerContext.UseHeaderForOAuthParameters = true;
    
        oSession.AccessToken = new TokenBase
        {
            Token = Session["accessToken"].ToString(),
            ConsumerKey = ConfigurationManager.AppSettings["consumerKey"].ToString(),
            TokenSecret = Session["accessTokenSecret"].ToString()
        };
    
        var body = "<AdvancedReportQuery xmlns=\"http://www.intuit.com/sb/cdm/v2\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.intuit.com/sb/cdm/v2 ..//RestDataFilter.xsd\"><BalanceSheetStd><OfferingId>ipp</OfferingId><EndTransactionDate>2012-06-01</EndTransactionDate></BalanceSheetStd></AdvancedReportQuery>";
    
        IConsumerRequest conReq = oSession.Request();
        conReq = conReq.Post().WithRawContentType("text/xml").WithRawContent(System.Text.Encoding.ASCII.GetBytes(body)); ;
        conReq = conReq.ForUrl("https://services.intuit.com/sb/advancedreport/v2/508053445");
        try
        {
            conReq = conReq.SignWithToken();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    
        string serviceResponse = conReq.ReadBody();
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a project that involves constructing functions from other functions. I had
I'm in the process of working on programming project that involves some pretty extensive
I am working on a project right now that involves receiving a message from
I am working on a project that involves a lot of data, and at
I am currently working on a project that involves many subprojects that all have
I'm working on a project that I need to eliminate all references to the
I am working for a PHP project that retrieves file meta information . All
I am working on a cross platform OpenGL project and it seems that all
I'm currently working on a project that involves a CSV file. I initially was
I'm currently working on a project that involves moving a database of documents for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.