How to Temboo with cURL


Temboo makes it easy to build applications that connect to over 100 web-based resources and services (e.g., Facebook, Dropbox, US Census data) by standardizing how you interact with their Application Programming Interfaces (APIs). Don't worry if you're not familiar with APIs – with Temboo you don't have to worry about the details.

Here we'll show you how to use the Temboo REST API - a great option if we don't have an SDK in your favorite programming language yet. In this tutorial we'll write a simple cURL command that uses Google's Geocoding API to retrieve information for a specific address, e.g., 104 Franklin Street, New York City. What makes Temboo uniquely powerful and useful is that once you know how to use one API, you know how to work with any API in our Library.

Before we get started, make sure that you've got cURL installed on your system.

Get Set up

1 Log in to Temboo. If you don't already have an account, you can register for free here.

Test on our website

2 Go to the Google > Geocoding > GeocodeByAddress Choreo in our Library. Select REST API from the drop down menu at the top of the page.

3 Enter any address or ZIP code in the Address input field, e.g., 104 Franklin Street, New York City.

4Click Generate Code to test the Choreo from our website. After a moment you'll see the data that Yahoo sends back shown in the Output section.

Auto-Generate The cURL command

When you run any Choreo from our website, we automatically generate code that can be used to make the same API call many languages. For languages we don't yet have an SDK for, we generate cURL commands, and you can learn how to use them below.

5Scroll down to find the Code section of the Choreo page. At this point, your script should look something like this:

curl --basic -u APP_NAME:APP_KEY --header "x-temboo-domain: /ACCOUNT_NAME/master" --header "Content-Type: application/json" --header "Accept: application/json" -X POST --data '{"inputs": [{"name":"Address", "value":"104 Franklin Street, New York City"}]}' "https://ACCOUNT_NAME.temboolive.com/temboo-api/1.0/choreos/Library/Google/Geocoding/GeocodeByAddress"

Try It Out

6Now you're ready to run the script and see the output. Copy the cURL script and paste it into your terminal or console. If all goes according to plan, you should see an XML response from Google.

What next?

Congrats! You just ran your first Choreo! Now you're ready to run any of our 2000+ Choreos with cURL. You're just a few steps away from making something extraordinary.

Once you've got your code up and running, you're ready to move on and do more. From monitoring your running applications, to moving your generated Temboo code to your preferred development environment and sharing it with colleagues, collaborators and friends - we've got you covered.

Need help?

We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.


Back