How to create a whatsapp bot? - python

I would like to create bot in whatsapp. The Idea is here when a user sends a whatsapp message to my phone number that should reply to them.
I have researched twillio since it's like a sandbox twillio uses it own whatsapp number and So when a new user comes the user should send the sandbox number. Then I searched for whatsapp API I don't have any company or anything so there I can't use the official whatsapp API.
Is there some other way of using whatsapp API when I recieve a message it should reply immediately.

Unfortunately, since WhatsApp is only opening its APIs to its trusted/business partners, you can only access it using their services. Some of the examples includes,
Vonage
Infobip
Wati
Twilio as you mentioned
If these are not enough for you, you can always write your own bot in Python using selenium to scrape the web app for WhatsApp and listen to new message by checking the page regularly.

Related

Can a telebot be able to send sms to its user?

I'm trying to make a telegram not which at some point is like to send an SMS to the user or verify something through SMS but I'm not sure if the telegram API allows for that. If it is possible, please his can I utilize it?
Note:I'm just a beginner in python so some things might seem unclear to me so please be easy on me
Firstly, Telegram bot API has nothing to do with user phone numbers. Due to a variety of security reasons, it doesn't give bots access to such information and if we just suppose that, why should it send SMS? It's not the responsibility of a messenger like Telegram.
You can just send users notifications on Telegram or asks them for their numbers, then send SMS by another service.

Open source Whatsapp business API client for python

I have my own Whatsapp business account.
I want to have a client that can:
Alert me when I get a new message
Be able to send an automatic reply based on the original message I've received.
I've searched the web for ready open source python clients I can use and found only one that might be suitable - https://pypi.org/project/wabclient/
The problem - there is no documentation on how to use it, reviews etc.
Are there any other open sources I can use to achieve my goal? Any sample projects that use wabclient?

Sending SMS texts in Python without the need for a 3rd party API?

Does anyone know what would go into sending text messages with Python WITHOUT the need for a 3rd party API? What knowledge do I need to have to achieve such a thing? I've only been coding for a few months, so I still consider myself fairly new and there's a lot I don't know about networking. I know there are services like Twilio that offer a python library for sending text messages, but if I wanted to type out my own script, from scratch, what would need to go into it. I'm willing to read some documentation if that's necessary as long as it's not hundreds of pages long. Being as detailed as possible in your response is greatly appreciated. Thanks!
This can be done by sending an email via SMTP to the SMS gateway of the carrier of the recipient phone number. Each carrier has a unique email address usually in the form of {number}#{host}. Within Python, you can use the builtin smptlib (or aiosmtplib) library to send the email. I wrote an example script here to send using GMail.
Please tell me if I did not understand your question correctly, then I will try to improve it or I'll delete it.
Sending an SMS requires something, that can send an SMS. Which is normally not your laptop / PC, except it has a SIM card and a mobile phone modem. So you need a mobile phone or a service, that offers sending SMS if you subscribe / pay.
Most professional available services allow to send an SMS with simple HTTP GET or POST requests, so you don't need a third party python module, but you must connect to a third party web API in most cases the python code is really simple, but first you need an SMS service provider
Some services also allow sending SMS via SMTP (sending emails) which
#acamso adresses in his response
If you have an Android device you could install shellms on it ( https://f-droid.org/en/packages/com.android.shellms/ ) connect it via USB to your PC and use adb to send SMS, which will be billed on your phone's bill / contract.
I am not aware of any SMS service, that is for free, so if you subscribe to an SMS provider it will provide you with an API, that can normally very easily be handled from python.

Trying to make a whatsapp bot

I am trying to make a WhatsApp bot inspired by the functioning of Discord bots, the bot will work in WhatsApp groups.
I have looked up the official WhatsApp Business API but I am not sure that they will not approve my number as it is just a hobby project and not a proper "business".
There is an alternative though and that is the Twilio WhatsApp API. However, they provide you with a sandbox. I can interact with it in DMs but as the sandbox number is a business account, I cannot add it to a group like discord.
I intend to write a server in python or node.
Can anyone share a solution or workaround? Only if I could add the Twilio number to a group my problem will be solved. Though I am ready to use any other API/Solutions for this.
There is actually a Python solution for this. It is a pain to set it up, but it still works. Check it out:
https://github.com/mukulhase/WebWhatsapp-Wrapper
It uses the webdriver Selenium to send/retrieve messages through Web-WhatsApp.
Be aware that it is against their rules, so your phone number might get banned!

How to get my WhatsApp password?

I am writing web service in python to work with WhatsApp. I am using pywhatsapp library for that. But can anyone tell me how to get my WhatsApp password? It is needed for Login using pywhatsapp.
Hours of searching in Google didn't give any result.
You can use the yowsup cli to register a new WhatsApp user. During this process you will get a new password. Just download the cli and follow the instructions under yowsup cli.
You should also be able to reregister your own mobile number if it has already been used with WhatsApp. (e.g. on your phone)

Categories

Resources