Register mobile number with WhatsApp using Yowsup and phone - yowsup

I have successfully registered a number with WhatsApp using Yowsup CLI like so:
Get the SMS:
python yowsup-cli registration --phone xxxxxxxxxxx --cc 1 -r sms
Register after getting the code:
python yowsup-cli registration --register xxx-xxx --phone xxxxxxxxxxx --cc 1
However, by doing so, it looks like it un-verifies the number from my phone.
Based on this link, it seems like there is a restriction on the WhatsApp side:
https://www.whatsapp.com/faq/en/general/21009863
Is there a way to associate a phone number in WhatsApp with Yowsup as well as a mobile device?

Whatsapp only has a single-session thing. You won't have any way to do it.

whatsapp don't allow you to have a single number at two diffrent places, but they allow you a temporary connection as we can see in the whatsapp web. anyway there is no way you can keep chatting and as well as use that paticular number for whatsapp too. my advice is to take a new number for yowsup because they might block you for running a bot

Related

How do I check if a mobile number is on WhatsApp or not with programming?

I wanted to build a web-based system using which you will come to know whether the mobile number is registered with WhatsApp or not? It's just to check whether the number entered in textbox have WhatsApp account or not?
I tried finding resources regarding the same but unable to get any solution on it, please share some link for reference so, I can implement it and get to the final result.
You can use the Whatsapp API through Wassenger of Waboxap to send a text message and via webhook service like Loggly determine if the message was delivered. The person will however get a message, which might cause them to block you.

How to use Dialogflow Phone gateway and handling it in backend platform like nodejs

I'm trying to understand phone gateway implementation in dialogflow but dont see much of documentation for how to handle in backend code using nodejs or any third party apps like twilio,viber etc.
My doubt is whether is it available for now or not and is their any documents regarding phone gateway which can be done through google mini device for voice calling?
Please correct me if I'm wrong about what I understand.
Dialogflow phone gateway is a great feature provided by Dialogflow. It is simple to activate. Just follow the instructions in the Integrations tab.
All your intents and webhook will just work fine as they do in the bot. But the response type is little different from other platforms. So check that once before building responses.
It only supports speech response that is returned to the user in the phone call.
as per Google documentation, it uses the V2Beta1 version of the API. It means you have all the normal fields of the V2 API inside the body and parameters of the webhook call (+1 "MlEnabled" field, but not important for the telefony gateway). See more here https://dialogflow.com/docs/reference/v2-beta-v2-migration-guide-api . I have also been searching for extra fields like the phone number who is calling (to use it in backend tasks like CRM lookup), but this is not there yet (I analysed the JSON response, there is nothing so far).
Some tip to integrate with Twilio (my use case too) : you can perfectly route the twilio call to a simple Twilio callflow (like checking for opening hours) then to the incoming DialogFlow number (as you would do with the black number of an IVR provider) and transfer the Dialogflow call to another incoming phone numbers (controlled by Twilio) where you do the rest of the callflow (typically the skill based routing).
Example : after the call, Twilio checks for opening hours > OK > forward to Dialogflow phone nbr for intent recognition > identify intent nbr1 > route to phone nbr1 of Twilio which is connected to a routing/queue to agent group nbr1 (idem for intents nbr2, 3, 4 ...).
In this example, some useful fields are missing in the JSON like the phone nbr of the caller(CLI), the phone number dialed, eventually some UUI ISDN field, ... that you would like to use for a CRM lookup and CTI popup. Let's keep an eye on it and maybe Google will add it in V2beta2 ...?

sending direct messages from nodejs script to telegram

Is it possible to send a message from a node.js server to someone's mobile number or telegram Id directly?
is it possible without using a telegram bot?
I need an API like below:
function sendMessage(senderTelegramId, receiverTelegramId, messageText)
In short: No, without a bot no way for now.
Detailed explanation:
In order for you to send users messages on telegram you would need to create your own telegram bot. They have a well documented API which you can read and play around with.
There are 2 things you should know about sending messages to users using telegram bot:
You can't just send random people messages on telegram even if you know their phone number, to send them messages you need to have their chat_id. See how in the docs
To get the chat_id the user must first click the start button that comes up when they open your bot for the first time. Telegram will send you the chat id of that user and you save it for later when you would want to send messages to that user.
There are tons of libraries that makes working telegram bots very easy, it wouldn't take you more than an hour to get started.
I hope this answers the question, feel free to ask further questions, I have made some bots and you can also play around with them to see how it works.
Cheers )
There is actually one more easiest way to send a message to chat
just fetch the URL
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
you can find more details here
https://xabaras.medium.com/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968

How can I add a Whatsapp function to my website?

I have very little reputation points so I cannod add a comment in this similar question.
But I need an explanation as the code is working in a different way as expected.
I would like to have a link on my website where the user can click on the whatsapp link and start the conversation with the contact.
The code I add is this:
href="intent://send/0123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end
where 0123456789 were substituted with a real number subscribed to whatsapp.
But it seems working only with my contact. If I have a new number it will not work and will tell me that the contact number is not connected to whatsapp (even if it is).
How can I solve this problem?
Once this first problem is solved, I'd like to add some preformatted text to the message like: message sent from website xyz. What code should I add?
This like of code is working for Android, I need it also for iPhone, what should I use?
This other code is working on Android and on iPhone, but it doesn't allow me to add a custom contact number:
whatsapp
abid can be only an ID from a contact already saved in you phone, otherwise it will open the contact selection page in whatsapp
Please, don't share links without explanation of the content as I'm not a developer, I'm just trying to do my best following instructions of people with more knowledge.
Thank you.
As long as your explanation describes you are looking for a user to be able to Click in order to open a Chat with a specific Whatsapp active user.
Nowadays Whatsapp has emitted an API to specifically solve this needs, it's called 'Click to Chat' API and must work on all devices:
https://faq.whatsapp.com/en/general/26000030
Also, the scheme for the link you were using seems to be working correctly nowadays when used like this:
whatsapp://send?text=MESSAGE&phone=+NUMBER&abid=+NUMBER

How to trigger an application in mobile automatically

My idea is to make an application start automatically when a message from a specific user reaches the inbox of the mobile . For example if my friend sends some numbers to my mobile, the sms has to be read and validated first and then calculator ( inbuilt mobile application) has to be triggered and process the numbers from the message. Please help me with the above query.
I am far from convinced you will be able to give the phone user access to the same sms you use to launch your MIDlet.
You may need to use native development on the phones that support it if J2ME can't give you exactly what you need.
In any case, you probably want to try with J2ME first so you need to read the specifications for JSR-118 and its PushRegistry API, along with JSR-120, which interfaces with SMS.
Most current J2ME-enabled phones will support static SMS Push but you will need to send the SMS to a particular port, much like you would data over a standard library socket.
I don't think you can trigger on just any old SMS message arriving.
This is the class you want to look at, in any case:
javax.microedition.io.PushRegistry

Resources