#This repo has the potential to be the first WhatsApp private api for PHP
This project intends to provide a fully private API for WhatsApp.
You Need!
- Brain
- Use PHP 7.1.25
- Install the libsodium PHP extension from PECL..
- Install composer.
- Install Java.
- You need to get your rc2 file from your android device
You need to have java installed, because java is needed for the AES-128-GCM Encryption
Request URL: https://v.whatsapp.net/v2/exist
GET Param:
ENC: Base64 encoded value of final output.
Parameters needed for Exists call:
cc: Country codein: Phone number without country codelg: Languagelc: Country Code (ISO 3166-1 alpha-2)id: User ID token, Incorrect generated by our app: Need a fixtoken: Login token, Incorrect generated by our app: Need a fixmistyped: 6 (unknown)offline_ab_exposure: "" empty string (unknown)authkey: ``, //TODO: FIND OUTe_regid: ``, //TODO: FIND OUTe_keytype: ``, //TODO: FIND OUTe_ident: ``, //TODO: FIND OUTe_skey_id: ``, //TODO: FIND OUTe_skey_val: ``, //TODO: FIND OUTe_skey_sig: ``, //TODO: FIND OUTfdid: ``, //TODO: FIND OUTexpid: ``, //TODO: FIND OUTnetwork_radio_type: 1 See Network Type Infosimnum: 1 or MSISDNhasinrc: Has in the rc2 file if yes then 1 else 0,pid: Process IDrc: See RC Info
All these parameters are encrypted and sent to WhatsApp in a GET request. The parameters are formatted as a query before encryption:
cc=xx&in=xxxxxx&lg=xx&lc=xx
As i have more time i will add more content and Code.
Open index.php and change your prefix, phone number without prefix, your language and country
$ident = new \WhatsAppAPI\Controllers\clientEntity(" Country code", "Phone number without country code", "en", "US");
Copy your rc2 file in sessions folder
and start the app with php index.php
you will get the following response
{"login":"15417543010","status":"fail","reason":"bad_param","param":"expid"}
If you would like to contribute to this project, please feel free to submit a pull request.
Contributions are welcome and will be fully credited.
We accept contributions via Pull Requests on Github.
- You will NOT use this API for marketing purposes (spam, botting, harassment, massive bulk messaging...).
- We do NOT give support to anyone who wants to use this API to send spam or commit other crimes.
- We reserve the right to block any user of this repository that does not meet these conditions.
This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk.