Intercom Docker SDKs (beta)

We've created the following Intercom Docker SDK images to help you get started with the Intercom API quickly in your favored language. They're designed to simplify the discovery of the APIs using your preferred programming language rather than simplifying your ability to modify of the SDK code itself.

The images are in beta at the moment since we are trialling their effectiveness, so if you have any feedback please let us know - you can tweet us at @intercomdevs or reach us through our messenger.

If you're not familiar with Docker, we recommend first taking a look at our guide to Docker basics.

Before you start

The beauty of Docker is that it takes care of most of the set up so you only need to worry about a few things before you start:

1. An access token
You will need to have an Intercom account to use the Docker image since it will require an access token. You'll need to have your access token on hand so you can pass this in as an environment variable, which will allow you get hit the ground running more quickly rather than having to copy and paste it into your code.

2. Install Docker
The only bit of software you need to have installed is Docker, which pretty simple to get up and running. Refer to our short guide to in install Docker, if you haven't already.

Launch your container

If you want more details on the specifics of the command to run these Docker images please see our Docker basics page explaining it in more detail. You can find specific details of how to run each container in the relevant Docker Hub repository below.

docker run --env AT="<ACCESS TOKEN>" -it --rm --name <YOUR CONTAINER NAME> intercom/sdk-images:<TAG> 

#For example, to download and run the node image
docker run --env AT="XXXXXXXXXXXXXXXXXXXX" -it --rm --name  node1 intercom/sdk-images:node-sdk

#Alternatively, mount you local code dir to container to use your IDE and  push  to git
docker run -v /home/<local-dir>/:/intercom/mount_dir  --env PAT="<ACCESS_TOKEN>" -it --rm --name node1 intercom/sdk-images:node-sdk

Docker images

There are images for the following SDKs. The links below will take you to Docker Hub. The images are in one repo called intercom/sdk-images. Each SDK images is then identified by a tag in the form of intercom/sdk-images:.

If you click on the Tag tab in the repo you will see a list of the images. Then simply use the above command to run the image for your SDK tag with your access token and you should have your own local SDK environment.

Ruby

Once you have your container running you should be able to run a simple script to retrieve a user:

ruby example-ruby/users/users.rb "USER_ID"

Node

Once you have your container running you should be able to run a simple script to retrieve a user:
node example-node/users/get_user.js "USER_ID"

go

Once you have your container running you should be able to run a simple script to retrieve a user:

go build example-go/users/get_user.go
./get_user "USER_ID"

php

Once you have your container running you should be able to run a simple script to retrieve a user:
php example-php/users/get_user.php "USER_ID"