mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Replace password with bearer token
This commit is contained in:
parent
b7313952aa
commit
11906a5530
@ -38,10 +38,11 @@ The same will work for automations.
|
|||||||
Using the [REST API](https://developers.home-assistant.io/docs/en/external_api_rest.html) to send a message to a given topic.
|
Using the [REST API](https://developers.home-assistant.io/docs/en/external_api_rest.html) to send a message to a given topic.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
$ curl -X POST \
|
||||||
-H "Content-Type: application/json" \
|
-H "Authorization: Bearer ABCDEFGH" \
|
||||||
-d '{"payload": "Test message from HA", "topic": "home/notification"}' \
|
-H "Content-Type: application/json" \
|
||||||
http://IP_ADDRESS:8123/api/services/mqtt/publish
|
-d '{"payload": "Test message from HA", "topic": "home/notification"}' \
|
||||||
|
http://IP_ADDRESS:8123/api/services/mqtt/publish
|
||||||
```
|
```
|
||||||
|
|
||||||
### {% linkable_title Automations %}
|
### {% linkable_title Automations %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user