Click here to Skip to main content
14,580,625 members
Rate this:
Please Sign up or sign in to vote.
See more:
https://sandbox-quickbooks.api.intuit.com/v3/company/{{companyid}}/query?minorversion=51  
    Postman Request
    Authorization :    
    Token Name : Token 10,    
    Auth URL : https://appcenter.intuit.com/connect/oauth2,
    Access Token URL : https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer,
    Client ID : ABCD,  
    Client Secret : xyz,   
    Grant Type : Client Credentials,  
    Headers - 
    User-Agent : QBOV3-OAuth2-Postman-Collection,  
    Accept : application/json,  
    Content-Type : application/json,  
    Authorization : bearer token,  
    Body :  
    {  
      "Name": "A 10",   
      "AccountType": "Accounts Receivable"  
    }

    Response :
     {   
          "Fault": {   
        "Error": [
            {
                "Message": "An application error has occurred while processing your request",
                "Detail": "System Failure Error: null",
                "code": "10000"
            }
        ],
        "type": "SystemFault"  
    },
    "time": "2020-06-29T18:01:30.262-07:00"  
    }
        var client = new RestClient("https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer");
        var request = new RestRequest(Method.POST);
        request.AddParameter("application/x-www-form-urlencoded", "grant_type=client_credentials&client_id=" + ClientID + "&client_secret=" + ClientSecret + "&redirect_uri=" + RedirectUrl + "&authorization_endpoint=https://appcenter.intuit.com/connect/oauth2", ParameterType.RequestBody);
        IRestResponse response = client.Execute(request);
        JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
        TokenResponse tokenresponse = javaScriptSerializer.Deserialize<TokenResponse>(response.Content);
        var clients = new RestClient("https://sandbox-quickbooks.api.intuit.com/v3/company/9620826365047887210/query?minorversion=51");
        var requests = new RestRequest(Method.POST);
        requests.AddHeader("user-agent", "QBOV3-OAuth2-Postman-Collection");
        requests.AddHeader("content-type", "application/json");
        requests.AddHeader("accept", "application/json");
        requests.AddHeader("cache-control", "no-cache");
        requests.AddHeader("authorization", tokenresponse.token_type+" "+tokenresponse.access_token);
        requests.AddParameter("application/json", "{\r\n  \"Name\": \"A 12\", \r\n  \"AccountType\": \"Accounts Receivable\"\r\n}", ParameterType.RequestBody);
        IRestResponse responses = clients.Execute(requests);


What I have tried:

for this we have to create account on intuit url : https://accounts.intuit.com/index.html I am trying to get proper response for create an account api in intuit. But inspite of trying different ways i end up getting error response mentioned above. I contacted support they say it works for them. Any modification so i can get proper response. posted request/response for postman and c# id mentioned in request is dummy not original.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100