GithubHelp home page GithubHelp logo

Comments (18)

aesedepece avatar aesedepece commented on July 27, 2024

This is me chatting with myself xD

Spoiler
Spoiler

from whatsapi.

hubail avatar hubail commented on July 27, 2024

Sleek! I was about to ask you about the backend part of the app? since we're thinking about rewriting the source into more "usable" piece of code.

And I'll leave the decision about the repo for you guys to vote.

from whatsapi.

aesedepece avatar aesedepece commented on July 27, 2024

@hubail This file server.php makes all the magic → https://github.com/aesedepece/WhatsAPI/blob/master/php/server.php

It receives POST calls with two variables: $_POST['id'] and $_POST['action'].

The first one, id, contains user data in an associative array like in this example:

$id = array(
    "cc" => "34",
    "pn" => "663xxxxxx",
    "imei" => "35471xxxxxxxxxx"
);

Second one, action, contains "what to do" in the same fashion. Example:

$action = array(
    "method" => "Message",
    "params" => array("123456789-1", "677xxxxxx", "Hello world!")
);

Of course I run a modified version of whatsapp.class.php which "echoes" json_encode() of the results instead of print_r them → https://github.com/aesedepece/WhatsAPI/blob/master/php/whatsapp.class.php

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@aesedepece I got "inactive".... ?

Array
(
[status] => inactive
[kind] => paid
[creation] =>
[expiration] =>
)

from whatsapi.

aesedepece avatar aesedepece commented on July 27, 2024

@michliu That's weird! Did you completely git clone my fork? :O
Please look for errors in your PHP log and tell me if any.
I'm concerned about you not being able to send messages yet. I won't stop until you are able to do so! :)

I guess you use WhatsApp in a iPhone. Don't you?

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@aesedepece Yes, I completely your fork , and I use WhatsApp in iPhone.

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@aesedepece But I have change my sim card to other android mobile.
[status] => inactive
[kind] => paid
[creation] =>
[expiration] =>

ERROR: INEXISTENT METHOD

from whatsapi.

aesedepece avatar aesedepece commented on July 27, 2024

@michliu Could you post your code? (Whatever you have written to call the API in js or php)
If your code is OK then the problem is related to your WhatsApp account.
Note that "method" is "Message" and not "Message()" as I posted at first.

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@aesedepece I add $id and $action to server.php

$id = array(
"cc" => "886",
"pn" => "9x6xxxxx8",
"imei" => "x5xxxx20xxxx09xx"
);
$action = array(
"method" => "Message",
"params" => array("123456789-1", "88691x3xxx0x", "Hello world!")
);
//$api = new API($_POST['id'], $_POST['action']);
$api = new API($id, $action);

from whatsapi.

aesedepece avatar aesedepece commented on July 27, 2024

That's all OK, but maybe the problem is more obvious than we thought:
I've read WhatsApp for iPhone uses iPhone's udid as udid instead of md5(strrev($imei)). Find your udid (something like 2b6f0cc904d137be2e1730235f5664094b831186), use it as imei in $action and replace $this->_id['udid'] = md5(strrev($this->_id['imei'])); with $this->_id['udid'] = $this->_id['imei']; in server.php.

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@aesedepece Login fail ! If i use iPhone udid.

from whatsapi.

darkhat avatar darkhat commented on July 27, 2024

@aesedepece can you share your client code?

from whatsapi.

aesedepece avatar aesedepece commented on July 27, 2024

Ok, just pushed it so there's no way back: different project, different repository.

Here you have: https://github.com/aesedepece/Guasa

Enjoy! You should be able to login, view your account settings, import contacts from .vcf, get last seen date for each of them and send messages to any one.

Receiving messages is on the go ;)

Please report any issues you'd find. Thanks!

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@aesedepece I have reset whatsapp password , then try again ...

[root@hv php]# php server.php
Array
(
[status] => active
[kind] => free
[creation] => 1288493592
[expiration] => 1635562392
)
But still can't send any message.. :(

from whatsapi.

ismail avatar ismail commented on July 27, 2024

aesedepece How are we supposed to set "WhatsAPI URL" ?

from whatsapi.

michliu avatar michliu commented on July 27, 2024

@cartman need server.php ->https://github.com/aesedepece/WhatsAPI

from whatsapi.

ismail avatar ismail commented on July 27, 2024

Ok when trying to login I get:

Uncaught SyntaxError: Unexpected token < guasa.class.js:48
Guasa.login guasa.class.js:48
login login.js:7
onclick index.htm:255

Debugging a bit more, I see:

"

Warning: Invalid argument supplied for foreach() in /home/ismail/public_html/WhatsAPI/php/server.php on line 27

{"status":"active","kind":"paid","creation":"1324842484","expiration":"1387914484"}"

from whatsapi.

aesedepece avatar aesedepece commented on July 27, 2024

For notifying issues related to Guasa, please use its own issue tracker:
https://github.com/aesedepece/Guasa/issues

Announcement: message receiving now works in Guasa :D

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.