Note: The Free API is only for personal use.
CallMeBot can now send WhatsApp Messages from the Apple Home App (HomeKit) Automations using the Shortcuts capabilities of the Home Hub (HomePod or AppleTV). Very simple to configure using the "Get Content of URL" Action within the Automation setup.

See below the step-by-step instructions to send WhatsApp Notifications Messages from Apple Home App.

Setup:

You need to get the apikey form the bot before using the API:

  1. Add the phone number +34 644 56 55 18  into your Phone Contacts. (Name it it as you wish)
  2. Send this message "I allow callmebot to send me messages" to the new Contact created (using WhatsApp of course)
  3. 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.
  4. 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.

Example:

  5. Enjoy

How to send a WhatsApp Message from an Home App Automation

It is very simple to send a WhatsApp Notification from any Home App Automation. Just follow these step by step instructions:

1) In the Home App, createa new Automation (Click + and then "Create Home Automation")

New Automation to send WhatsApp from HomeApp

2) Select and configure the trigger for the automation. In this example, the trigger will be when "People Arrive", but Callmebot works with any trigger. For example, you can configure it to trigger when someone rings the doorbell, a sensor detects something, then a light turns on, or when your kid gets home from school.

Trigger for the WhatsApp Message in HomeApp

3) After configuring the Trigger, Click "Next" to go to the Scenes and Accessories list. Select "Convert to Shortcut" (under Advanced at the bottom of the screen)

 Convert Scene to Shortcut to add the WhatsApp Message
 

4) Now you can call the Callmebot API using Home App’s native shortcut Web actions:

  1. If you don’t want this Automation to control or do anything else, remove the default “Set scenes and Accessories” action by tapping the “x” button next to it.
  2. Tap “Add Action” or use the Search box at the bottom.
  3. Select “Web” Category, and scroll down and select “Get Contents of URL”.
  4. Now paste your Callmebot API URL in the “URL” field of the action (see details and screenshot below).
Webhook to send whatsapp from Home App Shortcut Add action to send whatsapp message from "GET Content"Using WEB action to send whatsapp message from HomeKit Finally, calling to the CallMeBot API to send whatsapp message from HomeKitURL Format to send whatsapp message using Home App Shortcut
 

CallMeBot API URL details:

https://api.callmebot.com/whatsapp.php?source=homeapp&phone=[PhoneNumber]&apikey=[ApiKey]&text=[Text Message]

Where the blue parameters are:

[PhoneNumber]: Your phone number (used to get the apikey) including the country code (Ex.: +49123123132)
[ApiKey]: The apikey that you received during the activation process (step 4-5 above)
[Text Message]: Message that you want to send to your WhatsApp number when the trigger is activated. It has to be urlencoded. You can use this online converter to encode the message. (i.e. %20 for space, %0A for new lines). WhatsApp formatting characters are allowed (i.e "*" for bold, etc.). Check here how to include emoticons in the message 👍.

CallMeBot API URL Example:

https://api.callmebot.com/whatsapp.php?source=homeapp&phone=+49123123123&apikey=1234567&text=This+is+a+test+message+from+Home+App+Automation

5) If you want to Test your WhatsApp HomeKit Automation, see the "Testing your Automation" section below, before exiting the Action screen.

6) if you are done Testing (or do not want to test) you can tap Next and Done.