IFTTT using new HTTP API

Posted on
Fri Mar 24, 2023 10:40 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

IFTTT using new HTTP API

I thought we'd do a quick post on how to use the new HTTP API from IFTTT to turn execute action groups, turn on a light, etc.

Note: In the examples below, we refer to using an Indigo API Key. It's a good idea to generate one that you use specifically for IFTTT, which will allow you to essentially turn off IFTTT if your key gets compromised but without affecting other integrations you use.

First, let's take a look at the Make a web request action form on IFTTT (as of 3/24/2023):

IFTTT-empty-form.png
IFTTT-empty-form.png (198.25 KiB) Viewed 555 times


This form looks somewhat similar to what you might see when using the Get Contents of URL in the Apple Shortcuts app. Here's a quick overview of the fields in this form (examples will follow):

  1. URL - this is the URL for whatever it is you want to do and includes your reflector name
  2. Method - you will want to select POST from the popup
  3. Content Type - select application/json from the popup
  4. Additional Headers - this is where you want to add the Authorization header that contains your API key
  5. Body - this is where you want to insert the appropriate JSON message that you want to send to Indigo

Here are some more complete examples that mirror the examples in the HTTP API docs. First, let's Control an Indigo Device:

IFTTT-device-toggle.png
IFTTT-device-toggle.png (108.32 KiB) Viewed 555 times


You see that there are 3 places that you need to enter your specific information:

  • your-reflector-name in the URL should be replaced with the actual name of your Indigo Reflector
  • YOUR-API-KEY in the Additional Headers should be replaced with your actual Indigo API Key
  • DEVICEID in the Body should be replaced with the actual ID of the device you want to toggle

These same fields (or variations on the theme) will always be the part you need to substitute.

Next, let's Control an Indigo Device with Parameters:

IFTTT-device-with-params.png
IFTTT-device-with-params.png (114.8 KiB) Viewed 555 times


Along with the substitutions outlined above, you'll want to enter your own values for the parameters based on what you want to do.

Now, we'll Update a Variable's Value:

IFTTT-variable-update.png
IFTTT-variable-update.png (117.68 KiB) Viewed 555 times


In this example, we inserted an IFTTT ingredient ({{CheckTime}}) which will insert that value into the variable in Indigo.

Finally, let's Execute an Action Group:

IFTTT-execute-action.png
IFTTT-execute-action.png (251.41 KiB) Viewed 555 times


As you can see, the new HTTP API is a great way to integrate Indigo into your IFTTT recipes.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests