venomous0x / WhatsAPI

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

Cant send messages #1133

Open Wuuuz opened 9 years ago

Wuuuz commented 9 years ago

Hi,

i have a problem sending messages with WhatsAPI.

<?php include_once('src/whatsprot.class.php');

$username = "xxx";
$nickname = "xxx";
$password = "xxx"; // The one we got registering the number
$debug = true; 

// Create a instance of WhastPort.
$w = new WhatsProt($username, $nickname, $debug);

$w->connect(); // Connect to WhatsApp network
$w->loginWithPassword($password); // logging in with the password we got!

$target = '4915253438535'; // The number of the person you are sending the message
$message = 'Yo :)';

$w->sendMessage($target , $message);

?>

This is my code for senden a message. But when i want to send, i get empty page and no message is sent. I bought a prepaid card to register a new number. But why can't I see the debugtext?

Wuuuz commented 9 years ago

Can it be, that there is a problem with the registration? I registrated my number, status ok, but i can work on my mobile phone any more. So is there a registraion problem?

Wuuuz commented 9 years ago

Here some more details:

When I request a code, this is sent:

Array ( [in] => 157527xxxx [cc] => 49 [id] => | º‡aØ;#sË9,>Ó4|, [lg] => de [lc] => DE [sim_mcc] => 262 [sim_mnc] => 000 [method] => voice [token] => e7b86212dbbd6802a300d1a5612a83ae ) stdClass Object ( [status] => sent [length] => 6 [method] => voice [retry_after] => 82805 )

When I register a code, I get a blank website.

Now when i open my codeRequest.php, i get this:

Array ( [in] => 157527xxxx [cc] => 49 [id] => | º‡aØ;#sË9,>Ó4|, [lg] => de [lc] => DE [sim_mcc] => 262 [sim_mnc] => 000 [method] => voice [token] => e7b86212dbbd6802a300d1a5612a83ae ) stdClass Object ( [status] => ok [login] => 491575xxxxx [pw] => OmmAcKjEvxxxxx [type] => existing [expiration] => 1461094518 [kind] => free [price] => 0,89 € [cost] => 0.89 [currency] => EUR [price_expiration] => 1432720295 )

When i now want to send a message, I get a blank site, too :(

mgp25 commented 9 years ago

@Wuuuz go to WhatsAPI Official https://github.com/mgp25/WhatsAPI-Official

momenimohammad23 commented 9 years ago

@mgp25 Hi whats different between this link (https://github.com/venomous0x/WhatsAPI) and your link ?!