yeleswarapu ramakrishna Ответов: 0

Интуит разработчик создайте учетную запись запрос получаю ответ ошибка код 10000


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);


Что я уже пробовал:

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.

0 Ответов