3

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

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

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

This code is throwing the following error

Error Code: null,Error Message: Failed to disconnect: null null at com.intuit.ia.connection.PlatformHttpClient.disconnect(PlatformHttpClient.java:81) at com.intuit.ia.connection.IAPlatformClient.disconnect(IAPlatformClient.java:40) at com.intuit.ia.connection.IAPlatformClient$disconnect.call(Unknown Source)

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.

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

Any help would be appreciated.

Thanks in advance

EDIT

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

Now i get error code 50 "Missing appToken" error

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

UPDATE:

Link for Sample code for Quickbooks V3 API.

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

Raghav
  • 552
  • 1
  • 9
  • 34
  • Your Quickbooks disconnect API link is broken. – Ryan Gates Jan 12 '15 at 16:38
  • Quickbooks recently updated their resources. Last i used was a long time back and above links were active. You can use this [link](https://github.com/IntuitDeveloperRelations/QuickbooksV3API-Java/tree/master/QuickbooksV3API) for sample code. – Raghav Jan 21 '15 at 06:11
  • Rather than including the comment, can you edit your question to include the working link? – Ryan Gates Jan 21 '15 at 15:01

1 Answers1

1

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

Jar name - ipp-java-qbapihelper-1.2.0-jar-with-dependencies.jar

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/Disconnect

Request Header -

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

Response -

<?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>

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

Thanks

Manas Mukherjee
  • 5,270
  • 3
  • 18
  • 30
  • 2
    Thanks for the response. The jar ipp-java-qbapihelper.jar had the property for disconnect url missing in ia.properties file. Thats why the error was occurring. I included the property and recompiled the jar and now its working. Thanks. – Raghav Jan 02 '14 at 02:47
  • Yes.. in the sample project.. user defined ia.properties file has that entry. that's why it works fine there.. In the next release, this issue will be fixed in the helper jar. Thanks – Manas Mukherjee Jan 02 '14 at 05:12
  • Yeah, It's works after adding new line disconnect on ia.properties file. But I am wondering, how it is working for reconnect? my api is working file in case of reconnect, Do you have any idea @ManasMukherjee ?? – MrYo Aug 09 '14 at 17:41
  • May be that endpoint is hard coded some where else. I'm not sure now. You can use jd-gui de-compiler to see if that is the case. Otherwise, on Monday I'll try to check and confirm. thanks – Manas Mukherjee Aug 09 '14 at 18:30
  • Your referenced link is broken. – Ryan Gates Jan 12 '15 at 16:40
  • Hi Ryan, thanks for pointing this. There were many changes in the docs site. It was still referring to the old one. I've updated the link. Thanks – Manas Mukherjee Jan 13 '15 at 05:27