GithubHelp home page GithubHelp logo

sendMessage doesn't send? about whatsapi HOT 30 CLOSED

xTraXx avatar xTraXx commented on July 28, 2024
sendMessage doesn't send?

from whatsapi.

Comments (30)

MHaendel avatar MHaendel commented on July 28, 2024

Check the PHP Version, I think i = time() - 1

from whatsapi.

 avatar commented on July 28, 2024

timestamp + dash + any number
note that number after dash will only be valid once , means either timestamp or number will be increased after sending
i.e : 1338320323-1 .. 1338320323-2 .. 1338320323-3

from whatsapi.

xTraXx avatar xTraXx commented on July 28, 2024

I did this and it's still not working:
start("Countrycode + my phone number", "md5hashed(reversed EMEI)")
sendMessage(str(int(time.time())) + "-1", "Countrycode + receiver phone number", "Does it work?")

The script output: Last read ===> '\x00+\xf8\x08H8\xfa\xfc\x0bPHONENUMBER\x8aC\x05\xa2/\xf8\x01\xf8\x06/\x1d\xfc\x03404\xa2\x18\xf8\x01\xf8\x03J\xbd\xa9'

So it does something, but I didn't receive the message. (Note that I got this output also with i = 1 or 2 instead of the timestamp)

from whatsapi.

onny avatar onny commented on July 28, 2024

I'm having exactly the same issue. I'm getting an answer from the server, which I usually don't get if the login credentials aren't correct. But then the script stops/hangs, trying to receive an answer after sending a message. Unfortunately the recipient doesn't get the message.

from whatsapi.

onny avatar onny commented on July 28, 2024

Now I've received a really obvious answer from the server, lol:
Last read (login) ===> '\x00\t\xf8\x07t8\x8a\x94+\xbd\xb6'
Last read (msgsend) ===> '\x01\n\xf8\n]8\xfa\xfc\x06Server\x8aC\xfc\x0515490\xa2\x1b\x9d\xfc\n1338390608\xf8\x01\xf8\x02\x16\xfc\xdeNew version of WhatsApp Messenger is now available. Please visit http://www.whatsapp.com/appstore/ and upgrade to the latest version. Your upgrade will be free and will bring bug fixes and new features such as Group Icons!'
Last read (msgsend) ===> '\x00\x10\xf8\x02\x95\xf8\x02\xf8\x03 \xbd\xaa\xf8\x04\xc7\xbd\xaa\x82\x00\x03\xf8\x01\x02'

from whatsapi.

MHaendel avatar MHaendel commented on July 28, 2024

This API uses an outdated protocol.

from whatsapi.

xTraXx avatar xTraXx commented on July 28, 2024

Uhm the sending mechanism isn't working yet? Or am I doing something wrong?

from whatsapi.

onny avatar onny commented on July 28, 2024

yeah it's still not working

from whatsapi.

alexprovencio avatar alexprovencio commented on July 28, 2024

i tried yesterday the php version and it was working fine

from whatsapi.

jonymusky avatar jonymusky commented on July 28, 2024

I get the account_info but unfortunately the recipient doesn't get the message.

from whatsapi.

onny avatar onny commented on July 28, 2024

sinconexion, could you please explain what you entered into the example.php file and do you have a special apache-webserver setup?

from whatsapi.

alexprovencio avatar alexprovencio commented on July 28, 2024

i used my mobile phone number and imei reversed and then hashed as password, but it also works with the android emulator from the sdk (imei 000000000000000), of course you have to activate whatsapp before in the mobile or the android emulator for the number you are using to login, and add to that number and the one you are sending the messages the country codes (in my case 34 for spain)

i didn't use a web server, just exec the script using php from the command line, i'm using Ubuntu 12.04 and php 5.3.10

from whatsapi.

xTraXx avatar xTraXx commented on July 28, 2024

Yea the PHP script is working! :D
(just used usb webserver)

require "whatsapp.v2.php";

// DEMO OF USAGE
$wa = new WhatsApp("your number", "pass");
$wa->Connect();
$wa->Login();

$wa->Message(time()."-1","phonenumber", "message");

from whatsapi.

MHaendel avatar MHaendel commented on July 28, 2024

Seems the iphone password differs.

beeNetworks GmbH
Brauerweg 10 / 26419 Schortens
http://www.beeNetworks.net

Geschäftsführer: Sebastian Constapel
http://sebastianconstapel.de
Telefon: + 49 151 588 222 72
Steuernummer: 70/200/46178
UstID: DE265158811
Amtsgericht Oldenburg HRB 203417

Am 31.05.2012 um 09:55 schrieb "xTraXx" [email protected]:

Yea the PHP script is working! :D
(just used usb webserver)

require "whatsapp.v2.php";

// DEMO OF USAGE
$wa = new WhatsApp("your number", "pass");
$wa->Connect();
$wa->Login();

$wa->Message(time()."-1","phonenumber", "message");


Reply to this email directly or view it on GitHub:
#4 (comment)

from whatsapi.

johnhout avatar johnhout commented on July 28, 2024

I can't seems to find out how a iPhone password is defined, I understand its the UDID but does this also needs to be strrev and md5? or what is the format?

from whatsapi.

xTraXx avatar xTraXx commented on July 28, 2024

Yea, but try the php version, the python script doesn't work for me.
UDID --> reverse ---> md5

BTW can you send me a packet capture file (wireshark) of a login + send and receive message of whatsapp?(So just send an message to yourself). Because the packet structure of android seems to be different and this API is based on an iPhone.

I'm also dutch btw ^^,

from whatsapi.

johnhout avatar johnhout commented on July 28, 2024

Hm oké so this should be the following: ( werkt bij mij niet ).

$wa = new WhatsApp("31600000000", md5(strrev('UDID'))); 

VIVA H.....

from whatsapi.

xTraXx avatar xTraXx commented on July 28, 2024

In principe moet dat kloppen, ik heb alleen geen functie gebruikt, maar gewoon zelf de string omgedraaid en gehashed, maar dat zou niet uit moeten maken lijkt me.

//

That should be right, but I didn't use any functions, I just reversed the string and then hashed it manually, but that shouldn't be the problem.

from whatsapi.

johnhout avatar johnhout commented on July 28, 2024

heb jij toevallig google talk ofzo haha?

from whatsapi.

xTraXx avatar xTraXx commented on July 28, 2024

yea

from whatsapi.

dsdsfga avatar dsdsfga commented on July 28, 2024

Same problem here the message is not send. I can login and see that the message is send out in wireshark but then the server not react. If I guess right the codes hangs in the first read line after this line: $stream = $this->send($msg);

from whatsapi.

lukasklein avatar lukasklein commented on July 28, 2024

Same for me... The server does not respond with a single byte

from whatsapi.

dsdsfga avatar dsdsfga commented on July 28, 2024

I'm comparing the bytes which are send by the android app in the emulator and modified that the output to be 1:1 exactly the same. The server does not react but I just see that the auth is a little other than in android.

Android sends:
realm="s.whatsapp.net",response=...,nonce="...",digest-uri="xmpp/s.whatsapp.net",cnonce="...", qop=auth,username="...",nc=00000001
WhatsAPI sends:
username="...",realm="...",nonce="...",cnonce="...",nc=...,qop=...,digest-uri="...",response=...,charset=utf-8

The order does not match but this is maybe not important but the "charset=utf-8" is missing in the android output. I'm checking that...

I rewrote that auth code so that the charset part is missing.. and it works!

from whatsapi.

ozonostudio avatar ozonostudio commented on July 28, 2024

anyone can please tell me from where i download the "whatsapp.v2.php" file?

from whatsapi.

ccchan27 avatar ccchan27 commented on July 28, 2024

yeah! Where is whatsapp.v2.php?

Besides, UDID on iPhone, how about Android? IMEI?

from whatsapi.

vkotovv avatar vkotovv commented on July 28, 2024

@ccchan27 You could use whatsapp.class.php instead, it works for me, at least for login and sending text messages

from whatsapi.

assegaf avatar assegaf commented on July 28, 2024

@vkotovv
can you exactly explain to us how you did it, android/iphone whatsapp ?, modification at WhatsApi ? other different ?
I can login, but sending is not, also login is too long,
sometime get message outdated ..

from whatsapi.

vkotovv avatar vkotovv commented on July 28, 2024

@assegaf Here is the content of my example.php:

<?php
require "whatsapp.class.php";

// DEMO OF USAGE
$wa = new WhatsApp("7904xxxxxxxx", "3727305342fc1788f9e170a6bb8a47d4");
$wa->Connect();
$wa->Login();

// SEND A MESSAGE
$str = "Hello world!";
$wa->Message(time()."-1","7950xxxxxxxx",$str);
?>

But password (encoded IMEI) was not generated by this php code, I could present my version..

from whatsapi.

assegaf avatar assegaf commented on July 28, 2024

looks like you are not modifying some codes, and work out of box, mine still not working on sending. did you use iPhone for registration ?

from whatsapi.

vkotovv avatar vkotovv commented on July 28, 2024

@assegaf No, Android.

from whatsapi.

Related Issues (20)

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.