Skip to content

Frequently asked questions

mgp25 edited this page Apr 23, 2016 · 24 revisions

Please read this if you have a question, it might have been answered before.

Index

  1. Registration ('no_routes' and 'bad_param' issue).
  2. Registration (mismatch issue).
  3. Registration (not receiving sms or call).
  4. Problems logging in (errors or 'not_authorized').
  5. Im trying to send massive messages.
  6. Is there a way to prevent block?
  7. Is there any limit sending messages?
  8. Invalid media download request
  9. How to know whether a number is using WhatsApp or not
  10. How to recover/reset password
  11. How can i send emojis?
  12. How to know other users nicknames
  13. Broadcast not sending
  14. Receiving encrypted messages/onGetMessage doesn't work
  15. Sending message and not receiving it
  16. WA PW Extractor not working

Registration ('no_routes' and 'bad_param' issue)

no_routes appear when mobile operators can't reach your mobile network, it also appears when using some virtual phone services.

stdClass Object ( [status] => fail [reason] => no_routes [retry_after] => 3600 ) 

bad_param appear because WhatsApp can't recognize some virtual phone numbers, if you try with your own number will work.

Registration (mismatch issue)

mismatch appears when data are not equal doing different requests.

For example: You send a code request, and identity will be created, if you use any other identity when registering with the code you received, will cause the mismatch error. The same happens if you try to register with a different code that you received via SMS or voice call.

{"status":"fail","reason":"mismatch","retry_after":182}

Registration (not receiving sms or call).

Sometimes SMS or voice call doesn't arrive, it could have a delay. Try again in 10 minutes. If you are using virtual phone numbers and don't receive SMS or voice call, you have to deal with that.

Problems logging in (errors or 'not_authorized')

If this message is showed:

PHP Fatal error:  Uncaught exception 'Exception' with message 'Login Failure' in /opt/whatsapp_bridge/WhatsAPI/src/whatsprot.class.php:2145
Stack trace:
#0 /opt/whatsapp_bridge/WhatsAPI/src/whatsprot.class.php(576): WhatsProt->doLogin()
#1 /opt/whatsapp_bridge/whatsapp_bridge.php(43): WhatsProt->loginWithPassword('MYPASSWD...')
#2 {main}
  thrown in /opt/whatsapp_bridge/WhatsAPI/src/whatsprot.class.php on line 2145

It could be a connection issue or you have used a wrong password, make sure all the data is right.

-- If you are getting this:

rx  <failure>
rx    <not-authorized retry="7134" expire="14269" code="100"></not-authorized>
rx  </failure>

It means you are temporary blocked. How much time? Expire time in seconds, in this case, you will have to wait 237 minutes (14269 / 60).

If you are getting this instead:

rx  <failure>
rx    <not-authorized></not-authorized>
rx  </failure>

You are blocked.

Activity that can lead to this temporary ban includes:

  • Sending too many messages to users who do not have your number saved in their address books. Make sure that you ask all of your WhatsApp contacts to add your current number to their address books.
  • Being blocked by too many people in a short period of time. Make sure you only communicate with people who want to receive messages from you.
  • Creating too many groups that contain users who do not list you in their address books. Make sure that you ask all of your WhatsApp contacts to add your current number to their address books.
  • Sending the same message to too many people. Use Broadcast Lists to send the same message to your contacts.

Im trying to send massive messages

No, just no.

Is there a way to prevent block?

Yes, don't spam and use it for personal usage only. And you should have them synced in both ways.

Is there any limit sending messages?

Check issue #397

Invalid media download request

See issue #351

How to know whether a number is using WhatsApp or not

Use sendSyncfunction, there is an example in /examples/contactSync.php here

How to recover/reset password

Use checkCredentials()

$w->checkCredentials();

How can i send emojis?

You will need to have UTF8 enabled. Once then, you can send an emoji like this:

$msg = "Hello \xF0\x9F\x98\x84 !";

All emojis here (Bytes - utf8): http://apps.timwhitlock.info/emoji/tables/unicode

How to know other users nicknames

Reference Issue: #695

You cant, you only can know the push nickname when you receive a message.

Event: onGetMessage($mynumber, $from, $id, $type, $time, $name, $body)

$name

Broadcast not sending

Reference Issue: #867

Receiving encrypted messages/onGetMessage doesn't work

To support encryption, API requires (MUST):

More info. about the installation: https://github.com/WHAnonymous/Chat-API/wiki/Dependencies

Sending message and not receiving it

Probably you are disconnecting too soon. Add more pollMessage() before disconnecting

WA PW Extractor not working

WhatsApp Password Extractor (.apk) won't work (at all) with the latest WhatsApp versions.

What do i mean by not at all?

although the password shown in the apk is correct it wont work in the API, the reason is easy, it required more data in order to do a successful login, this is due the server static key, and client public and private keys, which is used for client-server encryption (Noise Protocol).

Clone this wiki locally