B4J Tutorial CallMeBot: A Free "Personal Use" Bot to send WhatsApp, Telegram, Messenger & Voice Calls

Hi

I am currently trying this out: https://www.callmebot.com/

The instructions are rather simple to follow.

1671454933146.png
 

Mashiane

Expert
Licensed User
Longtime User
Sending messages to Telegram...

One can use HTTPUtils to achieve this also. Your parameters for HTTPUtils should be user and the encoded text to send.

1671455043998.png



I am using this in BANano and thus using fetch for a GET method

B4X:
Private Sub btnSendTelegram_Click (e As BANanoEvent)
    'save settings
    Dim ls As Map = CreateMap()
    ls.Put("phone", txtTelephone.Value)
    ls.Put("api", txtAPIKey.Value)
    banano.SetLocalStorage2("callmebot", banano.ToJson(ls))
    '
    btnSendTelegram.Loading = True
    Dim api As SDUIFetch
    api.Initialize("https://api.callmebot.com/text.php")
    api.AddParameter("user", txtTelephone.Value)
    api.AddParameter("text", txtMessage.Value)
    banano.Await(api.GetWait)
    btnSendTelegram.Loading = False
End Sub

The received message will go to your callmebot API contact on your telepram.
 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
Sending Messages to WhatsApp

1. You will need your APIKey
2. You will need you cellphone number including county code.

B4X:
Private Sub btnSend_Click (e As BANanoEvent)
    'save settings
    Dim ls As Map = CreateMap()
    ls.Put("phone", txtTelephone.Value)
    ls.Put("api", txtAPIKey.Value)
    banano.SetLocalStorage2("callmebot", banano.ToJson(ls))
    '
    btnSend.Loading = True
    Dim api As SDUIFetch
    api.Initialize("https://api.callmebot.com/whatsapp.php")
    api.AddParameter("source", "web")
    api.AddParameter("phone", txtTelephone.Value)
    api.AddParameter("apikey", txtAPIKey.Value)
    api.AddParameter("text", txtMessage.Value)
    banano.Await(api.GetWait)
    btnSend.Loading = False
End Sub

The parameters to use are, source, phone (country code + number), apikey + text as message.

output:

1671456998824.png


Input...

1671457169166.png
 

Mashiane

Expert
Licensed User
Longtime User
Sending Messages to Facebook Messenger

B4X:
Private Sub btnSendMessenger_Click (e As BANanoEvent)
    'save settings
    Dim ls As Map = CreateMap()
    ls.Put("phone", txtTelephone.Value)
    ls.Put("api", txtAPIKey.Value)
    banano.SetLocalStorage2("callmebot", banano.ToJson(ls))
    '
    btnSendMessenger.Loading = True
    Dim api As SDUIFetch
    api.Initialize("https://api.callmebot.com/facebook/send.php")
    api.AddParameter("apikey", txtAPIKey.Value)
    api.AddParameter("text", txtMessage.Value)
    banano.Await(api.GetWait)
    btnSendMessenger.Loading = False
End Sub

1671458279996.png
 
Top