# Authentication

{% openapi src="<https://api.redocly.com/registry/bundle/openhue/openhue/v2/openapi.yaml?branch=main>" path="/api" method="post" expanded="true" %}
<https://api.redocly.com/registry/bundle/openhue/openhue/v2/openapi.yaml?branch=main>
{% endopenapi %}

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.openhue.io/api/openhue-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
