venomous0x / WhatsAPI

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

Do not getting Auth information of numbers over one year subscription to WhatsApp #644

Open rajenpal033 opened 10 years ago

rajenpal033 commented 10 years ago

Hello @shirioko , I am using this piece of code to retrieve Auth information of a number $this->getResponse($host, $query); It is responding well for a number has subscription period below one year. But for a number already expired one year subscription at WhatsApp are just showing status - failed, reason - incorrect and the that is similar to the result of any real incorrect number. While I am using the number over one year in my mobile apps fine, even from your Api I can register this kind of number and use to send message or I can send messages to this number from this Api. So, why not this Api returns correct status for these numbers. Anyways it is really a hard work thanks to you and your team. I am just using this as a developer for my own testing not for any Spamming. Can you please help with the problem.

shirioko commented 10 years ago

Come again?

rajenpal033 commented 10 years ago

Sorry for my bad English, look this is my custom function or just a modification of your method to check auth of a number

public function checkCredentialsCustom(){
        if (!$phone = $this->dissectPhone()) {
            throw new Exception('The prived phone number is not valid.');
        }

        // Build the url.
        $host = 'https://' . static::WHATSAPP_CHECK_HOST;
        $query = array(
            'cc' => $phone['cc'],
            'in' => $phone['phone'],
            'id' => $this->identity,
            'c' => 'cookie',
        );

        $response = $this->getResponse($host, $query);

        return $response;
    }

The response I am getting for a number registered in WhatsApp is status=ok and some other information now If I do the same for a number registered to WhatsApp and have subscription period over one year ( i.e. my own number, what I am using through my mobile WhatsApp app ), then the response is status=failed and and reason = incorrect, no other information. While it is showing correct result for a block and non-existing number.

rajenpal033 commented 10 years ago

@shirioko sorry to disturb you, but could you find out any solution for the mentioned issue?