WhatsAPI (Unofficial WhatsAPP API)

Discussion in 'PHP' started by bulldogjjb4, Apr 21, 2013.

  1. #1
    I'm looking at this code: https://github.com/venomous0x/WhatsAPI
    On the page: /src/php/EXAMPLES.php
    I've made the following changes (which I think is all I need to amend. I have obviously used different IMEI number and Mobile numbers for this example):



    $userPhone ='447799999999';# Telephone number including the country code without '+' or '00'. $userIdentity ='98B898B898B8';# This is tipically the IMEI number.# If you are using an iOS device you should input your WLAN MAC address. $userName ='John Doe';# This is the username displayed by WhatsApp clients. $destinationPhone ='447788888888';# Destination telephone number including the country code without '+' or '00'.# For groups: [phone number]-[group id]. $debug = TRUE; $w->requestCode('sms','GB','en'); $w->registerCode('123456');





    but when navigating to this example.php page on my server I receive the following error:
    Fatal error: Uncaught exception 'Exception' with message 'There was a problem trying to request the code.' in /whatsapp/src/php/whatsprot.class.php:1174 Stack trace: #0 /whatsapp/src/php/EXAMPLES.php(49): WhatsProt->requestCode('sms', 'GB', 'en') #1 {main} thrown in /whatsapp/src/php/whatsprot.class.php on line 1174
    I just want to know where I'm going wrong, can anyone shed some light? Thanks
     
    bulldogjjb4, Apr 21, 2013 IP