我试图将会计系统与QBO集成。除了将发票同步到QBO的部分外,我的一切工作正常。我收到以下错误:
"ERROR CODE: 3200 " and statusCode=401.
我搜索了文档和
Error code 3200 is "outdated edit sequence", and statuscode 401 is for "Authentication Failed".
我只有1个月的令牌。我不认为它已经过期了。
以下是错误日志:
------查询Select * from invoice -----
SELECT * FROM Invoice ORDERBY DocNumber
2014-12-14 10:54:43.700 INFO 4936 --- [nio-9001-exec-6] com.intuit.logger : HttpResponse content-type (deserialization format) : xml
2014-12-14 10:54:44.478 ERROR 4936 --- [nio-9001-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: com.intuit.ipp.exception.AuthenticationException: ERROR CODE:3200, ERROR MESSAGE:message=ApplicationAuthenticationFailed; errorCode=003200; statusCode=401, ERROR DETAIL:SignatureBaseString: GET&https%3A%2F%2Fsandbox-quickbooks.api.intuit.com%2Fv3%2Fcompany%2F1292716660%2Fquery&minorversion%3D1%26oauth_consumer_key%3DqyprdTJo1L1OpyrtEENk28kIl7lQGY%26oauth_nonce%3D5531296139710727189%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1418572482%26oauth_token%3DlvprdDaJWaGXoNB3KguFCef9s2GbjrMhnVjmICrLQiCQpZCJ%26oauth_version%3D1.0%26query%3DSELECT%2520%252A%2520FROM%2520Invoice%2520ORDERBY%2520DocNumber%26requestid%3D4b5f973c47b446a7ba4d0918eec9f5f3
] with root cause
com.intuit.ipp.exception.AuthenticationException: ERROR CODE:3200, ERROR MESSAGE:message=ApplicationAuthenticationFailed; errorCode=003200; statusCode=401, ERROR DETAIL:SignatureBaseString: GET&https%3A%2F%2Fsandbox-quickbooks.api.intuit.com%2Fv3%2Fcompany%2F1292716660%2Fquery&minorversion%3D1%26oauth_consumer_key%3DqyprdTJo1L1OpyrtEENk28kIl7lQGY%26oauth_nonce%3D5531296139710727189%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1418572482%26oauth_token%3DlvprdDaJWaGXoNB3KguFCef9s2GbjrMhnVjmICrLQiCQpZCJ%26oauth_version%3D1.0%26query%3DSELECT%2520%252A%2520FROM%2520Invoice%2520ORDERBY%2520DocNumber%26requestid%3D4b5f973c47b446a7ba4d0918eec9f5f3
at com.intuit.ipp.interceptors.HandleResponseInterceptor.execute(HandleResponseInterceptor.java:91)
at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeResponseInterceptors(IntuitInterceptorProvider.java:94)
at com.intuit.ipp.interceptors.IntuitInterceptorProvider.executeInterceptors(IntuitInterceptorProvider.java:67)
at com.intuit.ipp.services.DataService.executeQuery(DataService.java:323)
at com.intuit.developer.sampleapp.ecommerce.qbo.QBOGateway.determineInvoicesToPushAndSave(QBOGateway.java:150)
at com.intuit.developer.sampleapp.ecommerce.qbo.QBOGateway.createInvoicesInQBO(QBOGateway.java:123)
at com.intuit.developer.sampleapp.ecommerce.controllers.SyncRequestController.createSyncRequest(SyncRequestController.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1720)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
任何想法可能出错?
答案 0 :(得分:0)
由于错误消息表明这是一个身份验证问题。
这是因为以下任何一个问题。
在这种情况下,因为它是一个GET查询,所以很可能因为前两个问题中的任何一个而失败。
您可以使用OAuthPlayground工具生成accessToken和accessSecret。 https://appcenter.intuit.com/Playground/OAuth/IA
PN - 完成C2QB(OAuth)流程后,您应该使用“应用菜单API测试”。'选项,它将显示accessToken和accessSecret。
谢谢
答案 1 :(得分:0)
添加Bearer
或basic
'Authorization': 'Bearer AB11588770007gXsEtCmJfNsyIpquocg2k2tXmUoeCrw5I0YIASACSHHHHHDSDSDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'