CallMeBot can now receive WhatsApp messages from you, and react accordingly based on the rules that you defined.

---- THIS IS CURRENTLY IN DEVELOPMENT ----
Come back later or follow me on Twitter to get fresh news.

Setup:

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

1. Add the phone number +34 621 34 22 27 into your Phone Contacts. (Name it it as you wish)

  1. Send this message "I allow callmebot to send me messages" to the new Contact created (using WhatsApp of course)
  2. 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.
  3. 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 configure the Bot to answer to your Messagess

Before starting, please ensure that you follow the Setup process above and you have a valid apikey.

First step is to add the "queries" and respective "action" that you want the bot to perform. This means that the bot will perform the action every time that you send the query message via whatsapp. For example, you can send the message "Reboot the server" to the Bot Contact, and the Bot will call to the url: "http://youarserver.com/reboot_server.php".

How to Add a query and an action?

Just call to this API:

https://api.callmebot.com/whatsapp_add.php?phone=[phone_number]&apikey=[your_apikey]&query=[query]&action=[url]

[phone_number]: Is your phone number asociated to your WhatsApp including the country code. (Ex: +34 123 123 123).
[your_apikey]: The apikey that you received during the activation process (step 4-5 above)
[query]: could be any string that is not already taken. For example: "Turn on the alarm".
[url]: could be any URL that you want the bot to GET (Webhook). For example: https://maker.ifttt.com/use/TkRWa2ti2AwcPwaW

Example:

https://api.callmebot.com/whatsapp_add.php?phone=+34123123123&apikey=123456&query=Turn+on+the+alarm&action=https://maker.ifttt.com/use/TkRWa2ti2AwcPwaW

Output:
The bot will acknowledge with a message to confirm that the action (GET) has been executed. If you don't get any answer after a couple of minutes from the bot, that means that the query has not been recognized.

How to Remove an existing query?

To remove a query, just call to this API:

https://api.callmebot.com/whatsapp_remove.php?phone=[phone_number]&apikey=[your_apikey]&query=[query]

How to List all the configured queries?

You can list all the queries asociated to your phone number using the API below:

https://api.callmebot.com/whatsapp_list.php?phone=[phone_number]&apikey=[your_apikey]

 

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.