• Sumo

Today I am going to discuss how to get your iContact Account ID and Client Folder ID, which are two important pieces of information you need to access the iContact API. Also, in this tutorial I assume that you already produced an Application ID and its corresponding password (be it for a sandbox account or a production account – depending on what you’re working on). If you still haven’t, please follow the tutorial in the iContact Developer Portal about registering your app.

Before starting, decide on which account you will be working on – the Sandbox or the Production account.

For new development projects, it is recommended that you use the Sandbox account. As the term implies, you can play with the API here without worrying about accidentally spamming your actual contacts (or other horrible things :D). You can easily create a Sandbox account here. But, if you intend to work on live data, you can use the Production account right out for that purpose.

Here, let’s say I want to use my Production account because it is new and is pretty much devoid of any live data.

1. Download RESTClient

You can download it here. Select the one that says “RESTClient GUI.” Now, it is a Java application so be sure that you have the latest version of the Java Runtime Environment (JRE) installed in your computer. After downloading, run the application and you should see the following window afterwards:


2. Enter the API Headers

Click the Headers tab to enter the data needed to communicate with the iContact API. Here are the API Headers (from Getting Started with the iContact API):

  • Accept: [this value can be either text/xml (for XML) or application/json (for JSON)]
  • Content-Type: [this value can be either text/xml (for XML) or application/json (for JSON)]
  • API-Version: [this value can be either 2.0, 2.1, or 2.2]
  • API-AppId: [this value is the 32-Character Application ID you generated and enabled above]
  • API-Username: [this value is your Production account username (or your Sandbox account username if you are making calls to your Sandbox account)]
  • API-Password: [this value is the password you created when enabling your Application ID above not your Production or Sandbox account password]
API Headers
API Headers

To enter this to RESTClient, simply type the API Header name in the Key textbox (without colon). Likewise, type the value in the Value textbox. Click the button with the plus (+) sign to confirm.

Just remember not to mix up the values from your Production account and Sandbox account. I was pulling my hairs off only to find out that I mixed these up in my first attempts. In the example above, I entered my Production account’s info.

3. Get iContact Account ID with the GET Method

After entering all the necessary API Headers, it’s time to send them to iContact. I also got this mixed up the first time so check again which account you are using.

If you are using the Sandbox account send them to https://app.sandbox.icontact.com/icp/a/

If you are using the Production account send them to https://app.icontact.com/icp/a/

In this example I am using the Production account thus the URL. Make sure the method is set to GET before sending the request. Once you receive the response, click the Body tab below and find the value enclosed in <accountId></accountId> tags. This is your iContact Account ID.

Get iContact Account ID
Get iContact Account ID

4. Get iContact Client Folder ID with the GET Method and Account ID

You need the Account ID you just fetched to get the iContact Client Folder ID. You need only to send them to iContact via these URLs:

If you are using the Sandbox account send them to https://app.sandbox.icontact.com/icp/a/{accountId}/c/

If you are using the Production account send them to https://app.icontact.com/icp/a/{accountId}/c/

You need only to replace {accountId} with your own. Also, make sure the API Headers you entered earlier are still fed to the program and the method is set to GET. Submit the new response then find the value enclosed in <clientFolderId></clientFolderId> tags in the Body. This is your iContact Client Folder ID.

Get iContact Client Folder ID
Get iContact Client Folder ID

Now that you have these two important values of your iContact account, you can now access the rich functions the API has to offer.