• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

9.5 – Sending Messages to WhatsApp using CallMeBot API

Q&A Forum › Category: Raspberry Pi › 9.5 – Sending Messages to WhatsApp using CallMeBot API
0 Vote Up Vote Down
Rudolf Reiber asked 10 months ago

Hi Sara,
I do not use WhatsApp. But I found, that you can use CallMeBot API for the SIGNAL Messenger as well. It is very easy to adopt the code for it and it works great.
Perhaps this will help some other persons.
Sencerely yours, Rzdolf

4 Answers
0 Vote Up Vote Down
Rudolf Reiber answered 10 months ago

Hello Sara,
I have an improvement for the sketch to generate the URL encoded strings: I wrote a function to do this:

def string_to_url(s):
   st = ''
   for y in s:
      z = y.encode('utf-8')
      st = st + ''.join(['%{:02x}'.format(k) for k in z])
   return(st)

So you do not have to go to the http://www.urlencoder.io site first.
Hope it will help.

0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

Hi.
That’s great.
Thank you so much for sharing this.
I’ll probably update the code later to use that new feature.
Regards,
Sara

0 Vote Up Vote Down
Rudolf Reiber answered 10 months ago

Hello,
I forgot that you need a

import binascii

to do this.
Also, all letters/numbers are converted to url format, so the abc becomes a %61%62%63, but this is not disturbing. The message is transmitted correctly by SIGNAL.
Greetings!

0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

Great.
Thanks a lot for the info.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.