mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Replace password with bearer token
This commit is contained in:
parent
561a0c5c23
commit
1ed2343f86
@ -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.
|
||||
|
||||
```bash
|
||||
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"payload": "Test message from HA", "topic": "home/notification"}' \
|
||||
http://IP_ADDRESS:8123/api/services/mqtt/publish
|
||||
$ curl -X POST \
|
||||
-H "Authorization: Bearer ABCDEFGH" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"payload": "Test message from HA", "topic": "home/notification"}' \
|
||||
http://IP_ADDRESS:8123/api/services/mqtt/publish
|
||||
```
|
||||
|
||||
### {% linkable_title Automations %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user