Intuit 开发人员创建一个帐户请求,获取错误响应代码 10000



为此,我们必须在Intuit上创建帐户 网址 : https://accounts.intuit.com/index.html 我正在尝试在直觉中创建帐户 api 获得适当的响应。 但是,尽管尝试了不同的方法,我最终还是得到了上面提到的错误响应。 我联系了支持人员,他们说这对他们有用。 任何修改,以便我得到适当的回应。 已发布的邮递员和 C# 请求/响应 请求中提到的ID是虚拟的,不是原始的。

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", "{rn  "Name": "A 12", rn  "AccountType": "Accounts Receivable"rn}", ParameterType.RequestBody);
IRestResponse responses = clients.Execute(requests);

我认为你应该从这里实现他们的SDK:https://developer.intuit.com/app/developer/qbo/docs/develop/sdks-and-samples-collections/net#connect-to-quickbooks-online 而不是使用RestSharp。

我还在PHP中做了一个Intuit实现,我看到你缺少诸如scope之类的东西:"scope"=>"com.intuit.quickbooks.accounting","QBORealmID","accessTokenKey"和"refreshTokenKey">

请确保在有效负载中发送开始日期和结束日期

最新更新