mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-04-28 23:37:15 +00:00
Update communication.md (#2221)
This commit is contained in:
parent
0e3ed70208
commit
4e417d84a1
@ -15,7 +15,7 @@ Use `supervisor` for communication with the internal API.
|
||||
|
||||
## Home Assistant Core
|
||||
|
||||
An add-on can talk to the [Home Assistant Core API][core-api] using the internal proxy. This makes it very easy to communicate with the API without knowing the password, port or any other information about the Home Assistant instance. Using this URL: `http://supervisor/core/api` ensures that internal communication is redirected to the right place. The next step is to add `homeassistant_api: true` to the `config.yaml` file and read the environment variable `SUPERVISOR_TOKEN`. Use this as the Home Assistant Core [bearer token](/auth_api.md#making-authenticated-requests) when making requests.
|
||||
An add-on can talk to the [Home Assistant Core API][core-api] using the internal proxy. This makes it very easy to communicate with the API without knowing the password, port or any other information about the Home Assistant instance. Using this URL: `http://supervisor/core/api/` ensures that internal communication is redirected to the right place. The next step is to add `homeassistant_api: true` to the `config.yaml` file and read the environment variable `SUPERVISOR_TOKEN`. Use this as the Home Assistant Core [bearer token](/auth_api.md#making-authenticated-requests) when making requests.
|
||||
|
||||
For example `curl -X GET -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" -H "Content-Type: application/json" http://supervisor/core/api/config`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user