断开quickbooks v3 api中的应用程序 [英] Disconnecting app in quickbooks v3 api

查看:98
本文介绍了断开quickbooks v3 api中的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究 quickbooks v3 api 集成.我已经完成了所有集成,但卡在 Quickbooks Disconnect from app 中.

I am working on quickbooks v3 api integration. I have done all integrations but got stuck in Quickbooks Disconnect from app.

我正在使用以下代码片段断开与 quickbooks 的连接

I am using the following snippet of code for disconnecting from quickbooks

final IAPlatformClient pClient = new IAPlatformClient();
pClient.disconnect(consumerkey, consumersecret, accessToken, accessTokenSecret);

此代码抛出以下错误

错误代码:空,错误信息:断开连接失败:空空在 com.intuit.ia.connection.PlatformHttpClient.disconnect(PlatformHttpClient.java:81)在 com.intuit.ia.connection.IAPlatformClient.disconnect(IAPlatformClient.java:40)在 com.intuit.ia.connection.IAPlatformClient$disconnect.call(Unknown Source)

不确定我是否缺少断开连接 api 的任何依赖项,因为所有其他集成(登录/蓝点菜单/连接到 QB)与 v3 API 一起工作正常.

Not sure if i am missing any dependency for disconnect api as all other integrations(sign-in/blue-dot menu/connect to QB) are working fine with the v3 API.

我使用 v2 quickbooks API 完成了它,一切正常,但在 v3 中得到了这个.

I had done it using v2 quickbooks API and everything was working but getting this in v3.

任何帮助将不胜感激.

提前致谢

编辑

Quickbooks 在 https://developer.intuit.com/docs/0025_quickbooksapi/断开 API0060_auth_auth/0015_disconnect_api 描述了 URL 需要一个 GEt 请求.因此,我还尝试向 api url 发出 GET 请求,而不是通过 v3 API,如下所示

Quickbooks disconnect API at https://developer.intuit.com/docs/0025_quickbooksapi/0060_auth_auth/0015_disconnect_api descripbed the URL requires a GEt request. So instead of going through the v3 API i also tried to make a GET request to the api url as follows

https://appcenter.intuit.com/api/v1/Connection/Disconnect?oauth_token=token&oauth_token_secret=secret&oauth_consumer_key=key&oauth_consumer_secret=secret

现在我收到错误代码 50缺少 appToken"错误

Now i get error code 50 "Missing appToken" error

断开连接 API 是否适用于 GET 请求?我在这里缺少哪个参数?

Does the disconnect API work with GET request? Which parameter am i missing here?

更新:

Quickbooks V3 API 示例代码链接.

Link for Sample code for Quickbooks V3 API.

https://github.com/IntuitDeveloperRelations/QuickbooksV3API-Java/tree/master/QuickbooksV3API

推荐答案

能否请您在类路径中添加最新的(1.0.2)qbapihelper jar 并尝试调用.

Can you please add the latest(1.0.2) qbapihelper jar in your classpath and try the call.

jar 名称 - ipp-java-qbapihelper-1.2.0-jar-with-dependencies.jar

断开 API 没有任何问题.它工作得很好.您可以使用像 fiddler 这样的任何标准 RESTClient 来尝试这个调用.PFB 详细信息.

Disconnect API doesn't have any issue. It worked fine. You can try this call using any standard RESTClient like fiddler. PFB details.

GET URI - https://appcenter.intuit.com/api/v1/Connection/断开连接

请求头 -

content-type: application/xml
Host: appcenter.intuit.com

响应 -

<?xml version="1.0" encoding="utf-8"?>
<PlatformResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://platform.intuit.com/api/v1">
  <ErrorMessage />
  <ErrorCode>0</ErrorCode>
  <ServerTime>2013-12-24T10:09:48.7601Z</ServerTime>
</PlatformResponse>

以上响应表明 API 调用成功.参考 -编辑 - 更新最新的文档参考 -https://developer.intuit.com/docs/0050_quickbooks_api/0020_and_authentico

The above response suggests a successful API call. Ref - Edit - Updating the latest doc ref - https://developer.intuit.com/docs/0050_quickbooks_api/0020_authentication_and_authorization/oauth_management_api#Disconnect

谢谢

这篇关于断开quickbooks v3 api中的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆