From 1ed2343f869d46e8feae3de6d246686169176943 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 30 Dec 2018 22:32:09 +0100 Subject: [PATCH] Replace password with bearer token --- source/_components/notify.mqtt.markdown | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/_components/notify.mqtt.markdown b/source/_components/notify.mqtt.markdown index a1a33ef7e43..04a40d2a110 100644 --- a/source/_components/notify.mqtt.markdown +++ b/source/_components/notify.mqtt.markdown @@ -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 %}