GithubHelp home page GithubHelp logo

whatsapi's People

Contributors

hubail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsapi's Issues

sendMessage doesn't send?

I tried the python script, and the login seems to work (When I use the sendMessage function I get a Last seen: "long code here") But the message isn't sent (The receiver doesn't receive them.)
I used these parameters:

start("", "<md5 hashed(reversed EMEI)>")
sendMessage("1", "", "Does it work?")

For the i parameter I used a couple of numbers (1,2,3). I also tested it with other receivers.

error in example

when i run example.php i only see strange characters

ø��8Š�ø�–ø�ø�~_ø��½§üXbm9uY2U9IjQ5MzA0NTc5MjU2MiIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==

account_info

Array ( [status] => active [kind] => free [creation] => 1346384382 [expiration] => 1377920382 ) #ø�™½§” R7#ü 13463843820ü 1377920382

ø�t8Š”+½¶

�ø�•ø�ø� ½ªø�ü�text½ª‚�ø��

003af8085da0fafc0c3538343136353734353034368aa21b43fc0c313334363339343837342d31f802f804babd4ff801f8018cf80216fc04686f6c61

RequestLastSeen not working

Hi,

I'm having problems while trying to get the last seen information. I've been able to connect/login, get the account info (active) and receive messages, but I can't send messages nor get the last seen, which for me, seems to be a problem within the requests.

Additional info:

Symbian 3rd
PHP version
Tried both, venomous0x and aesedepece source code.

Regards!

Send Messages doesn´t work

Hello everyone,
I tried the WhatsAPI PHP, running within a Virtual Box.
I downloaded the latest Version 800 C90C.

Receiving Messages works well, what was really exciting!
But i can´t send any Message wit the API.
I use the IMEI of an Android 2 Phone.

Somebody else has experience with this problem?
Have a nice weekend.
falomundo

Can connect and receive messages just fine, but Message() just doesn't seem to work.

Using the simple code:

Connect(); $wa->Login(); $wa->Message(time()."-1","+35191xxxxxxx","Testing!"); ?>

It retrieves any amount of messages I send from my phone without any problem, but it gets stuck on the $this->read(); calls in Message() unless I set a timeout for it. In which case it stops receiving data and still doesn't send the message as intended.
I'm pondering a light mobile web client for people with older phones (2.5g with J2ME and browsers like Opera Mini 4-5), but am still struggling with the proof of concept.

Cheers.

Edit: Worth saying I already searched through similar issues and none of the presented solutions worked (both replacing some lines in the authentication call which didn't fix it and prevented me from logging in successfully and using this->read(); calls to flush out the messages buffer).

Java Port

You mentioned a Java port of your API, is it available yet?

Client delivery report

Hello, I am able to Tx, and Rx messages, but I would like to put the final touch on there and that involves the Client delivery report.

Currently if I send a message from php to an actual WhatsApp, I get back a Client Delivery report, which is good.

But if I send a message from an actual WhatsApp to php, the actual WhatsApp never gets the client delivery report, and as such only gets 1 check mark, further more if I disconnect the php and reconnect, I will get the un-acknowledged messages again...

I was just wondering if anyone has successfully sent a Client Delivery report from php?
Thanks

PHP example

Obviously I'm not smart enough to understand the usage of [-l] [-s ] [-i ] in the included tests/whatsapp.php (newest WhatsAPI version).

I edited the correct $sender and $imei for my iOS device (checked it under https://r.whatsapp.net/v1/exist.php?...) but I don't know how and which argv I should use. Over the URL like this? /tests/whatsapp.php?-s

Thanks for your help!

Socket error 10053

Well, this might be a stupid question, but I´ve spent a long time trying to figure what was I doing wrong, and finally...
Oh My God! It´s working!

But, my joy last only a few minutes, as I´m finding impossible to do anything. It´s just like if it couldn´t login.

print_r($wa) returns:
(
[_server:WhatsApp:private] => s.whatsapp.net
[_host:WhatsApp:private] => bin-short.whatsapp.net
[_Digest_Uri:WhatsApp:private] => xmpp/s.whatsapp.net
[_Realm:WhatsApp:private] => s.whatsapp.net
[_Qop:WhatsApp:private] => auth
[_contype:WhatsApp:private] => STREAM_CLIENT_PERSISTENT
[_accinfo:WhatsApp:private] =>
[_account_status:WhatsApp:private] =>
[_account_kind:WhatsApp:private] =>
[_account_creation:WhatsApp:private] =>
[_account_expiration:WhatsApp:private] =>
[_incomplete_message:WhatsApp:private] =>
[_number] => 34668XXX483
[_password] => 8a96a98e8da62XXXXX2d66e6eabee340
[_nickname] => Juan
[_socket] => Resource id #7
)

And PHP warns with every action:

Warning: socket_read(): unable to read from socket [10053]: Se ha anulado una conexión establecida por el software en su equipo host..

which, translated into english, would mean

Warning: socket_read(): unable to read from socket [10053]: An established conne ction was aborted by the software in your host machine.

As far as I know, that means the WhatsApp server is blocking my attempts of connection.
I promise I have done research through the internet, but this is definitely not working. Tried on my own computer, on a dedicated VPS, and in a laptop without firewall (software nor hardware)

Could you be so grateful to help me?
Thanks ^.^
(and if you consider i´ve done wrong asking here, try to be polite, I´ll do the same for you ;P)

Login not working

Hey,

I am currently reversing the protocol too and wrote the Password generator like it's in the WindowsPhone App. Reverse the String and generate the (Digest)MD5 out of it.

I tried both, UDID and IMEI, both didn't worked. Have you any Idea what this could be?

cant connect with iPhone

hello,

how can i connect with iphone?
what password should i put?

im trying to use the example php but i only get strage chars

thanks

Not Working Since 2.8.3...

I still have it works a few days before
but after the 2.8.3 update announced, it can't complete the login process anymore.
It so strange that the old version (2.6.10) on my phone is still fine.

anyone have the same issue?

Cant read Socket

Warning: socket_read(): unable to read from socket [0]:
\src\php\whatsprot.class.php on line 140

    $ret = socket_read( $this->_socket, 1024 );

Send to group

Hello,

I've been looking for something just like this and I can't wait to try it out!

But it seems you can't send msg to groups ? or How can we find the JID of a whatsapp group?

Thanks again for your awesome work!

port to Node

This would be really cool, if ported to node.js!

getting upgrade messages again

iPhone-2.6.9-5222 is receiving messages begging to upgrade again, "Your upgrade will be free and will bring bug fixes and new features such as Group Icons!"

doesn't seems to be working

does it still work ? any version php or python ? and how am I supposed to get the password ? is it the same as for verification code ?

Display nickname instead of number doesn't work

Currently the receiver gets only the sender number, not the sender nickname.

Tested on an iOS device. The number is on the notify bar while WhatsApp is in the background.

Looks like a WhatsAPI problem. Messages between Whatsapp work very well.

Also the auth with iPhone based accounts work very great (using the MAC address).

$challengeArray["nonce"] not being initialized.

While trying to send a message, with a valid password authentication (using an Android bound account), This pops up:

PHP Notice:  Undefined property: WhatsProt::$challengeArray in ./WhatsAPI/src/php/whatsprot.class.php on line 119

With no other error message as far as I can tell from neither the WhatsApp servers nor from the code itself. I don't have another phone to test if any messages are being sent, but apparently, they aren't.

I'm having a hard time to pin down if $challengeArray is correctly initialized, specifically for the "nonce" element.

Blackberry Password

Does anyone happen to have figured out how the password is generated for Blackberry devices?
Can anyone confirm whether md5(reverse(imei)) works or not?

Sending messages to 1000 or more wahtsapp users

I try to send messages to all subscriber

I use this code

     for($i=0;$i<20;$i++)

{   $wa->Message(time()."-1","99999999999","".$i."");
    sleep(1);
}

Error :
socket_send() [function.socket-send]: unable to write to socket [0]: An established connection was aborted by the software in your host machine.

Error :
Warning: socket_read() [function.socket-read]: unable to read from socket [0]: An established connection was aborted by the software in your host machine.

and send 2 messages only

Not being able to connect

I cant seem to login or send any message using the php version.

my code:

require "whatsapp.v2.php";

$password = md5(strrev('0000MYIMEI'));

// DEMO OF USAGE
$wa = new WhatsApp("000PHONE", $password);
$wa->Connect();

$wa->Login();

$msg = $wa->Message(time()."-1","000PHONE","hello!!!");

the $msg returns NULL and the $wa returns this:

object(WhatsApp)#1 (13) { ["_server":"WhatsApp":private]=> string(14) "s.whatsapp.net" ["_host":"WhatsApp":private]=> string(22) "bin-short.whatsapp.net" ["_Digest_Uri":"WhatsApp":private]=> string(19) "xmpp/s.whatsapp.net" ["_Realm":"WhatsApp":private]=> string(14) "s.whatsapp.net" ["_Qop":"WhatsApp":private]=> string(4) "auth" ["_contype":"WhatsApp":private]=> string(24) "STREAM_CLIENT_PERSISTENT" ["_account_status":"WhatsApp":private]=> string(0) "" ["_account_kind":"WhatsApp":private]=> string(0) "" ["_account_creation":"WhatsApp":private]=> string(0) "" ["_account_expiration":"WhatsApp":private]=> string(0) "" ["_number"]=> string(12) "MYNUMBER" ["_password"]=> string(32) "MYPASSWORD" ["_socket"]=> resource(5) of type (Socket) }

getting disconnected when mobile client goes online

Hi,
i have the issue that i am getting disconnected (without any message) when the mobile client on the cellphone goes online in WA.

What happens is that i get an empty line after [] Listen mode: - and then i am not able to receive messages sent after that.

Any ideas ?

Debate: should a client using this API be hosted in a different Github repo?

I'm writing a JavaScript client for WhatsApp which makes calls to a forked version of this API. I expect to publish and free it next week. You'll love it for sure :)

So the question to debate is:
Should it be hosted as a different project in Github?

I think so, but I'm likely to hear opinions from project's committers and followers as I am a democracy lover :P

(This issue report should be marked as resolved once we come to agreement or by the 4 of July)

Unable To login at all?

So, I can send, and recieve some data, but after sending the first message this happens.

Test123123123123123PHP Warning:  socket_read(): unable to read from socket [54]: Connection reset by peer in

Fix warning about $str in decode.php

In the decode.php there is a function decode. To prevent warnings about unknown variable $str you might want to add $str = null; before the foreach.

Can't make it work on python

Hi!
I've tried with both php and python (also with ruby thorugh rubypython gem)

In php it works perfectly with a code like this:

Connect(); $wa->Login(); $wa->Message(time()."-1","34666332211","test!"); But can't make it work in python. My current code is like this: import whatsapi whatsapi.start("34666112233","reversedmd5edimei") whatsapi.sendMessage("1","34666332211","test!") Any clues?

Error in decode.php

In Line 240 is curriently the value "l$dict" but this should be "last".
I found that out while compairing the code from WhatsAPI and wazapp.im source.

Submit custom nickname

In whatsapp.v2.php line 211 is a username embeded this should may changed.

If I guess right the byte after \xfc defined the length of the nickname followed by the name.

At the moment I have no idea if that is relevant but a static "Ahmed Mohd" for everyone seems to be wrong ;-)

Add IOS Password generation

I think the code only works for android, for ios is different. Read this article (is from 11 sept)

The password would be like md5(2*lan mac address) = md5(AA:BB:CC:DD:EE:FFAA:BB:CC:DD:EE:FF) "because Apple does not allow third-party applications to access IMEI number".

(Sorry my english)

Problem with sending messages

Hi,
I activated my account on an Android OS and by using md5(strrev(MYIMEI)) I could successfully log in to server and get the info of my account from that. But when I try to send the message I get no result and the return value of socket_read( $this->_socket, 1024 ) at every three times is null.
Has anyone any progress?
I have created my account just some days ago. Can it be a reason for the problem? I mean maybe they except different data from new users who use the last version (Version 2.7.8509)

tnx in advance

Damn: unable to read from socket - But every thing else is fine

Hi
I just started got the newest files filled in my IMEI and Phonenumber

I can use the "whatsapp.php" to send and to read but
after it gets all new messages it returns Warning

Warning: socket_read(): unable to read from socket [0]: .....
c:\myfolder\php\whatsprot.class.php on line 140

it also does it in interactive chat with argument -i but messaging is no problem

Can i ignore this message or is there a better way to handle this?

Is it possible to send Chinese character?

I have seen #22
I know the code changes everything into UTF-8 but no idea about how to change for sending Chinese characters

Could you give me any guide so that I change some code to send Chinese characters?

Unencrypted packet dump file

Hi,

Does someone have the unencrypted packet dumpfile (for wireshark). Because I think you have to send some information back if you get the client delivery report, but I can't check that now, because I don't have a dumpfile.

xTraXx

login took time too long

why is login took time so long, then I fugured out with some debug log read twice/three times on login, last one took like 2 minutes.

get some reply like this, and I put str2hex , I dont know what it means.

[Custom] process k:0 v: H8�C1344924219-ping�:����q�� str2hex 20f80848388a43fc0f313334343932343231392d70696e67a23af801f80371bdac

I m unable to send in Arabic

Hello

the API work very well , but i m unable to send Arabic messages ( not delivered at all )
i changed the encoding from ANSI to UTF-8 and still same problem

Regards

How i know if the password is correct

There is a way to return a boolean if the password and number is correct? How can i know?
I am from Chile (sorry for my english) and the login function doesn't work, y try a lot of numbers and combinations but nothing happens. I don't know if i log in but i can't send messages... I will sniff the official client latter when i have time. Other questions, the implemention nowadays of ssl doesn't affect this api?

Send Video Message

I want to send Video Message I use same sending Image function but with putting video Link.

    public function sendImage($msgid,$to,$path,$size,$link,$b64thumb){
    $thumb_length = hex2str(_hex(strlen($b64thumb)));
    $to_length = chr(mb_strlen($to,"UTF-8"));
    $msgid_length = chr(mb_strlen($msgid));
    $path_length = chr(mb_strlen($path));
    $size_length = chr(mb_strlen($size));       // in bytes
    $link_length = chr((strlen($link)));
    $content = "\xF8\x08\x5D\xA0\xFA\xFC$to_length";
    $content .= $to;
    $content .= "\x8A\xA2\x1B\x43\xFC$msgid_length";
    $content .= $msgid;
    $content .= "\xF8\x02\xF8\x04\xBA\xBD\x4F\xF8\x01\xF8\x01\x8C\xF8\x0C\x5C\xBD\xB0\xA2\x44\xFC\x04\x66\x69\x6C\x65\xFC$path_length";
    $content .= $path;
    $content .= "\xFC\x04\x73\x69\x7A\x65\xFC$size_length";
    $content .= $size;
    $content .= "\xA5\xFC$link_length";
    $content .= $link;
    $content .= "\xFD\x00$thumb_length";
    $content .= $b64thumb;
    $total_length = hex2str(_hex(strlen($content)));
    $msg ="";
    $msg .= "$total_length";
    $msg .= $content;
    echo str2hex($msg);
    $stream = $this->send($msg);
    $this->read();
}

this is call sending Function

      $link = "http://zzzzzzzzzzzz.com/v1.mp4";
      $thumb = file_get_contents("demo/x3.jpg");
      $b64thumb = base64_encode($thumb);
      $wa->sendImage(time()."-1","99999999999","ccf7b9444a511639efd998260b712253.mp4","99999",$link,$b64thumb);

I think that the problem is in the $path ??

Thanks in Advanced

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.