Authentication

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

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
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"
    }
  }
]

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.

Last updated

Was this helpful?