Open abdulla2013 opened 10 years ago
use checkCredentials() to check numbers
Hello, I do not want to run it via a number after authentication using checkCredentials() , because I have seen multiple of issues blocking numbers after they run checkCredentials() even they did not send any messages, so the way that I used not asking for any authentication or numbers.
Is I am right @blueslmj
-Abdulla
checkCredentials() just use to get informations from whatsapp's server, does not affect anything
@blueslmj Can you give me the code that can be used to? for example we just need to write: checkCredentials($number) where $number is the mobile number? -Abdulla
nah, the procedure is:
$wa = new WhatsProt($username, $identity, $nickname, $debug);
$wa->connect();
$wa->loginWithPassword($password);
$wa->checkCredentials();
Note that the password change if you call that function
@mgp25 Thank you, but this is for checking my number I think!! What I need is to check if this number is correct, whatever it has whatsapp or not!
So, for example, if the user send his number I can see it is wrong format or not, Using this link for example: https://v.whatsapp.net/v2/exist?in=****&cc=**
Hope you got my point!
Then use contactsync.php, it will tell you if the user has whatsapp or not
Hi, @mgp25 getting white page, I do not know why. the link that I used: contactsync.php?phone=****&pass=****&u[]=999999999999999
But it is loading for few seconds then white page. is there any issue with this file, you think?
@abdulla2013
contactsync.php?phone=YOURPHONE&pass=YOURPASSWORD&u[]=NUMBER1&u[]=NUMBER2 ...
Real numbers.
Still getting white page, when I turn the debug; it is showing:
Only!
Seems that you are not logging in
hi mgp25 , i thanks for you help, but if any one need to use contactsync.php with POST method not withe $_GET is this possible if , yes please tell us how we use it please and can i use and what's the correct format of u[] can you tell us example please best regards
Yes, it's possible. read this: php.net/manual/es/reserved.variables.post.php
i tis work now or no ?
Hello,
I had an issue with doing some integration with WhatsAPI, I have this whatsapp link to check the number: https://v.whatsapp.net/v2/exist?in=****&cc=** it is working fine without any issue, as showing: {"status":"created","id":"+wl5i8QcMWyI8chvty2hzxg667M=","sms_length":6,"voice_length":6}
The problem is when I make PHP script to link it with WhatsAPI, and call php it is showing: {"status":"fail","reason":"blocked"}
I try to called php file itself, showing same:
This is the PHP file:
<?php function curl_get_contents($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $data = curl_exec($ch); curl_close($ch); return $data; } $url = "https://v.whatsapp.net/v2/exist?in=*****&cc=***"; $json = curl_get_contents($url); echo $json;
?>
What exact the issue are? is there any header I need to do? Can you test it in your container?
-Abdulla