Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check whatsapp online status

I've been asked to create a mobile application that checks the online status of selected whatsapp contacts, and notifies the user when the selected contact is online. I think this is possible, because it already exists another app that uses the same information and it works at least for someone:

https://play.google.com/store/apps/details?id=com.kiwiio.clonspy

However I have no clue about what kind of software interface I should query in order to obtain the whatsapp online status of a contact.

Is there any kind of WhatsApp API that I can use for that purpose? Android or IOs? Or both?

like image 324
Lucio Crusca Avatar asked Feb 25 '15 08:02

Lucio Crusca


People also ask

How do you check if someone is online on WhatsApp without them knowing?

All it takes is looking at the person's icon in your chat list, and a green circle will indicate that they are online. With WhatsApp, things aren't this straightforward. This feature isn't hidden, either, but you won't be able to see if someone is online by looking at their profile pic within the chat list.

Why can't I see when someone is online on WhatsApp 2022?

You might not be able to view someone's most recent location or online status for the following reasons: They might have chosen to hide this information in their privacy settings. You may not have disclosed your last seen in your privacy settings. You cannot view other contacts' last seen if you don't tell your own.


1 Answers

According to this answer for iPhone developers on WhatsApp FAQ;

WhatsApp provides two ways for your iPhone app to interact with WhatsApp:

1-)Through a custom URL scheme

2-)Through the iOS Document Interaction API

If your application would like to open a WhatsApp Chat with a specific contact, you can use our custom URL scheme to do so. Opening whatsapp:// followed by one of the following parameters, will open WhatsApp and perform a custom action.

NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
    [[UIApplication sharedApplication] openURL: whatsappURL];
}

On another answer for Android developers on WhatsApp FAQ, you can send a message via WhatsApp with an ACTION_SEND intent. You can also bypass the system picker, you can set sendIntent.setPackage("com.whatsapp"). For custom URL scheme:

WhatsApp provides a custom URL scheme to interact with WhatsApp:

If you have a website and want to open a WhatsApp chat with a pre-filled message, you can use our custom URL scheme to do so. Opening whatsapp://send?text= followed by the text to send, will open WhatsApp, allow the user to choose a contact, and pre-fill the input field with the specified text.

Here is an example of how to write this on your website:

<a href="whatsapp://send?text=Hello%20World!">Hello, world!</a>

There are two parameters at the time which are according to answer given for iPhone developers, which are app and send. Go to first link to find detailed information.

Also check WhatsAPI library by venomous0x.

like image 196
Mel Avatar answered Sep 19 '22 13:09

Mel