Note: The Free API is only for personal use.
CallMeBot API can send WhatsApp Text Messages from your ESP8266, ES32 NodeMCU and probably many more boards.
Setup:
You need to get the apikey form the bot before using the API:
1. Add the phone number +34 684 783 708 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.
Note: If you don't receive the ApiKey in 2 minutes, please try again after 24hs. - 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:
58
5. Enjoy
5. Note, If you need any of the capabilities listed below, please check https://textmebot.com (low cost) or https://www.twilio.com/ (best official provider)
- Send messages to others
- Send messages to Groups
- Send messages from your whatsapp number
- Send Images
- Send Buttons
- Send documents
- Receive the answers
How to send WhatsApp Messages from your ESP8266 / ESP32 NodeMCU board
It is very simple to send WhatsApp messages from your ESP8266 or ESP32 NodeMCU board. You just need to use the htttp GET function.
I will not write step by step instructions and rather prefer to redirect you to some very good sources that I used myself to play with my boards.
Source1:
Article published by Rui Santos from RandomNerdTutorials with a code examples and detailed explanations about each peace of code. Very good for learning how the GET method works with the ESP.
https://randomnerdtutorials.com/esp8266-nodemcu-send-messages-whatsapp/
Source2:
Library published by Hafidh Hidayat on his GitHub page to send WhatsApp messaged from the ESP8266. Excelent solution to avoid all the coding and use direcrtly the Library to send the messages.
CallMebot ESP8266 Library: https://github.com/hafidhh/Callmebot-ESP8266
CallMeBot ESP32 Library: https://github.com/hafidhh/Callmebot-ESP32
Others?
You you have a video, a post, some code or anything to share, feel free to contact me to post it here in this webpage.
Problems?
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 using the API, don’t hesitate to contact me in Telegram @callmebot_com or by email at [email protected]. Remember to Follow me on Twitter to get news about coming features, changes, invitations, etc.