OpenHue
GitHubHue Developer Portal
  • OpenHue
  • 📗API
    • OpenHue API
      • Authentication
      • Resource
      • Bridge
      • Home
      • Device
      • Light
      • Scene
      • Room
      • Zone
      • Sensors
  • 💻CLI
    • OpenHue CLI
    • Installation
    • Setup
    • Commands
      • Lights
      • Rooms
      • Scenes
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. API
  2. OpenHue API

Authentication

The authentication API allows to retrieve the hue-application-key, that is passed as header for Authorization.

PreviousOpenHue APINextResource

Last updated 1 year ago

Was this helpful?

You absolutely need to press the button on your Hue bridge before calling this endpoint. Otherwise, the response will contain the message "link button not pressed".

This is a security step so that only apps you want to control your lights can. By pressing the button, you prove that you have physical access to the bridge.

📗

Authenticate

post

Authenticate to retrieve the HUE application key. Requires to go and press the button on the bridge

Body
devicetypestringOptionalExample: app_name#instance_name
generateclientkeybooleanOptional
Responses
200
Authentication Success
application/json
401
Unauthorized
application/json
post
POST /api HTTP/1.1
Host: 192.168.1.0
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "devicetype": "app_name#instance_name",
  "generateclientkey": true
}
[
  {
    "success": {
      "username": "a4e08834-0893-4013-b646-738582ec15c9",
      "clientkey": "8c7f2f7e-efb5-4b89-9b54-aac797040ea4"
    }
  }
]