hello. I’m trying to import Quickbook Time with t...
# cfml-general
s
hello. I’m trying to import Quickbook Time with the API and update it with my own data. This is my first time using the API with Coldfusion. It works fine in postman of their example. But there is no coldfusion sample. With cfhttp. and params It doesn’t work well using cfhttp. Can I get a more detailed explanation of cfhttp?
p
There are examples at the bottom of that page
You would need to obtain a OAuth token and then use that on another cfhttp call to make your request
b
Hi Jimmy, you can with CF but there are no available SDKs. I have a lot of experience with the QuickBooks API. As Patrick was pointing out, you have to think in terms of http calls through each of the oAuth steps. As a hint, look at the CURL examples and reproduce them using CF. Hope that helps.
b
@Sung Ham, why do you say, "It doesn’t work well using cfhttp"? Could you share the code that you tried? The documentation https://tsheetsteam.github.io/api_docs/#getting-started is straight-forward. In fact, when I use cfhttp with the URL in the "CURL" section of the documentation, I get a 200 OK response. Even though I use arbitrary request-data!
<cfhttp url="<https://rest.tsheets.com/api/v1/authorize?response_type=code&client_id=MYAPPCLIENTID&redirect_uri=https://somedomain.com/callback&state=MYSTATE>" method="get" >
</cfhttp>
<cfdump var="#cfhttp#" >
s
Coldfusion Server CF9 It turn out to be SSL error. In commandbox( Lucee 5.X) There is no problem. It’s time to upgrade CF server with latest version. Thank you
b
Right on. Lucee is a far better choice IMO.
b
@Sung Ham, thanks for the update. A very likely reason why cfhttp cannot connect to Quickbooks Time is now apparent. ColdFusion 9 is just too old. There is a link to SSL. A lot of services only allow TLS versions of 1.2 or higher. TLS v1.0 and TLS v1.1 were deprecated on Java versions from 11.0.11 onwards. You may only use Java 11 from ColdFusion 2018 Update 2 onwards. In short, there is every chance that the Quickbooks Time API expects you to connect with TLS v1.2 or higher.
👍 1