venomous0x / WhatsAPI

Interface to WhatsApp Messenger
2.59k stars 2.14k forks source link

How to check if recipient has WhatsApp installed on their phone #686

Open tstanbur opened 10 years ago

tstanbur commented 10 years ago

Hi,

Is there a way of checking if a user has WhatsApp installed and active? (I want to make this check before sending a message - I will send an SMS if they don't have WhatsApp)

I've tried playing around with the function sendGetRequestLastSeen (passing in the phone number) but it doesn't return anything at all - is this the best way? Does anyone have example code for this or another method ?

Thanks in advance! Tom

dacripox commented 10 years ago

Try to you use the code sync contacts code use to get which contacts have whatsapp. After sync with Google to get contacts you will find the code you need. Good luck!

*You should know, if you send a wa message to someone who doesn't have wa number registered yet, he will receive it the girst time he register his number installing WhatsApp.

tstanbur commented 10 years ago

Hi, thanks for the reply but I don't think this will work as the numbers I am sending to are not in my contacts.

I want to use this for alerts related to a web application which has 100,000 users and will be sending messages to (up to) 20 users at a time.

Ideally I want to query using their phone number to see if they have a what's app account or used it?

On 15 Apr 2014, at 21:59, dacripo notifications@github.com wrote:

Try to you use the code sync contacts code use to get which contacts have whatsapp. After sync with Google to get contacts you will find the code you need. Good luck!

*You should know, if you send a wa message to someone who doesn't have wa number registered yet, he will receive it the girst time he register his number installing WhatsApp.

— Reply to this email directly or view it on GitHub.

blueslmj commented 10 years ago

use contactsync.php

tstanbur commented 10 years ago

thanks to both of you - have just used contactsync.php and it works as I want!

I thought it would only work with contacts for the account I'm logging in with but it works for checking any number.

blueslmj commented 10 years ago

you will be blocked if you are checking more than 10k numbers use this sync method.

shirioko commented 10 years ago

That's quite an impressive amount of friends you have there

thed3v1l commented 10 years ago

Hi,

Can you post the code/function here how you were able to check.

Using contactsync for 10,000 would definatelty block you. You can use multiple instances to get out of this.

tstanbur commented 10 years ago

I am just going to check one number at a time. Check the number using contactSync and if exists then send a message to that number.

On 17 Apr 2014, at 22:09, thed3v1l notifications@github.com wrote:

Hi,

Can you post the code/function here how you were able to check.

Using contactsync for 10,000 would definatelty block you. You can use multiple instances to get out of this.

— Reply to this email directly or view it on GitHub.

blueslmj commented 10 years ago

Using contactsync you can check more than 500 numbers at a time, in one login thread.

abhisheksanghvi8 commented 9 years ago

Our smart software can filter which numbers have whatsApp and which do not. If you want to buy this software or us to this for you, Call me on +91-9160157358 or email to abhishek.sanghvi8@gmail.com

abhisheksanghvi8 commented 9 years ago

Our website is www.bulksmsglobal.in

abhisheksanghvi8 commented 9 years ago

Thanks in advance

yazeed44 commented 9 years ago

https://github.com/yazeed44/Whatsapp-SyncUtil-java

aashish commented 5 years ago

@yazeed44

https://github.com/yazeed44/Whatsapp-SyncUtil-java

Getting Page not found error.