Yes! Now Home Assistant can send WhatsApp Text Messages thanks to the CallMeBot Free API. You just need HA to execute a WGET or CURL command to send WhatsApp Messages. Find below the step-by-step instructions to implement it.
You need to get the apikey form the bot before using the API:
- Add the phone number +34 644 97 54 14 into your Phone Contacts. (Name it it as you wish)
- Send this message "I allow callmebot to send me messages" to the new Contact created (using WhatsApp of course)
- Wait until you receive the message "API Activated for your phone number. Your APIKEY is 123123" from the bot. As this is still in beta testing, the activation can take up to 2 minutes.
- The WhatsApp message from the bot will contain the apikey needed to send messages using the API.
You can send text messages using the API after receiving the confirmation.
How to send a WahtsApp message using the API
You need to use the following URL:
[phone] is the destination phone number to send the message (For example: +34123123123)
[apikey] is the apikey that you received in the step 4 above
[text], is the message that you want to send. You can encode the URL (i.e. %20 istead of space, %0A for new lines) or use the symbol "+" for the spaces. WhatsApp formatting characters are allowed (i.e "*" for bold, etc.). Check here how to include emoticons in the message 👍.
For example, to send the WhatsApp text message "Alarm from HomeAssistant to inform you that the alarm has been triggered" to the phone number +34 123 123 123, the URL will be:
To do that in Home Assistance is pretty easy! You have two (or more) different ways to do it:
Instructions: Using the HA REST Notify service
0) Request an apikey (see the Setup section above)
1) Create a new "REST Notify" service in the configuration.yaml:
# Example configuration.yaml entry notify:
- name: WhatsApp
phone: +34123123123 #enter your phone number here
apikey: 456789 #enter your apikey here (see Setup above)
... action: service: notify.WhatsApp data: message: 'This+is+Home+Assistant+sending+you+a+WhatsApp+Message+to+you'
How to test the notification
You can easly test the new notification service using the Services Section available in the "Developer Tools"
If you have problems, like not receiving the Call on Telegram, or not receiving the WhatsApp messages, try to test the CallMeBot API using your Web Browser:
- Telegram Phone Calls using Web Browser: here
- Telegram Text Messages using Web Browsers: here
- WhatsApp Text Messages using Web Browser: here
You might get some errors on the screen that will help you to identify the problem. (Ex: Calls disabled in the Telegram Security Settings, WhatsApp not activated, etc.)
If you still have problems to use this API, don’t hesitate to contact me in Telegram @callmebot_com or by email at [email protected] Rember to Follow me on Twitter to get news about coming features, changes, invitations, etc.