Lifx

Wi-Fi enabled LED smart lights

Go to site

Lifx API Integrations

Build and run workflows using the Lifx API. Use 1000s of source-available triggers and actions across 1000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

Lifx is a platform that allows developers to build lightbulb-connected applications. With the Lifx API, you can control the color, brightness, and power of Lifx-connected lightbulbs. You can also create schedules and routines to automate your lightbulbs. Some examples of things you can build with the Lifx API include:

  • A lightbulb that turns blue when it rains
  • A lightbulb that turns red when your favorite team scores
  • A lightbulb that gradually wakes you up in the morning
  • A lightbulb that dims when you start watching a movie
  • A lightbulb that turns off when you leave the house
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    lifx: {
      type: "app",
      app: "lifx",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api.lifx.com/v1/lights/all`,
      headers: {
        Authorization: `Bearer ${this.lifx.$auth.oauth_access_token}`,
      },
    })
  },
})

Authentication

Lifx uses OAuth authentication. When you connect your Lifx account, Pipedream will open a popup window where you can sign into Lifx and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Lifx API.

Pipedream requests the following authorization scopes when you connect your account:

remote_control:all
OAuth Request Configurations:
  1. authorization
    GEThttps://cloud.lifx.com/oauth/authorize?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&state={{oauth.state}}&response_type=code&scope={{oauth.space_separated_scopes}}
  2. accessToken
    POSThttps://cloud.lifx.com/oauth/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&redirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}