PHPackages                             sintret/whatsapp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sintret/whatsapp

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

sintret/whatsapp
================

Yii2 extension for Whatsapp plugin

07272PHP

Since Mar 6Pushed 11y ago2 watchersCompare

[ Source](https://github.com/sintret/WhatsAPI)[ Packagist](https://packagist.org/packages/sintret/whatsapp)[ RSS](/packages/sintret-whatsapp/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (2)

WhatsAPI
========

[](#whatsapi)

Interface to WhatsApp Messenger

---

### Update March 15th, 2014

[](#update-march-15th-2014)

Sources are back after brief downtime due to [DCMA takedown](https://github.com/github/dmca/blob/master/2014-02-12-WhatsApp.md).

### Note July 30th, 2013

[](#note-july-30th-2013)

*New policy:*

*I no longer provide support to users who are trying to send bulk messages using this API (i.e. a large amount of messages and not the built-in bulk message functionality).**Sending advertisments on WhatsApp goes directly against their EULA and I have no way of determining whether the user is trying to send spam, advertising or sending mass messages to "opt-in users".**And I also don't want to waste the little spare time that I have on trying to figure out ways to fuck up this beautiful ad-free platform called WhatsApp by enabling people to send spam.**Everyone is free to use this API but there will be no more issue reports about being blocked after sending messages to semi-random users.*

*In the famous words of Heath Ledger as the Joker (taken completely out of context by me):*

**It's not about the money, it's about sending a message.**

*- [shirioko](https://github.com/shirioko)*

---

### Note July 14th, 2013

[](#note-july-14th-2013)

*Events renamed:*

- *A large number of events have been renamed in the event handling system to better match the recent method names.*
- *All event names and parameters have been listed in the EVENTS.md file*

---

### Note July 10th, 2013

[](#note-july-10th-2013)

*Another massive overhaul in the code:*

- *MAJOR RENAMING OF MOST METHODS!! Old legacy code will break, we are sorry but it is necessary to provide a cleaner interface. Please check the new code.*
- *Methods renamed to give a more consistent feel to the API - all methods are now camelCase watch out for typo's!*
- *Initial movement towards bringing the code into alignment with PSR-2 ()*
- *There is absolutely NO, NONE, NADA, ZIP, 100% FREE of any need to use/enter a MAC address or IMEI in this code. DO NOT TRY!*
- *[New Android token used](https://github.com/karolsarnacki/whatsapp/commit/55d8233b852ecd9f6a6f845586e91e6fadbd0c44#L1L20) as WP7 one appears to no longer work. Long live the WP7 token?*

---

### Note June 18th, 2013

[](#note-june-18th-2013)

*Big overhaul in the code. Big thanks to:*

- *[Ali Hubail](https://github.com/hubail) and*
- *[Ahmed Moh'd](http://fb.com/ahmed.mhd) for making this project happen (and adding me as a member)*
- *[Jannik Vogel](https://github.com/JayFoxRox) for helping me retrieve the latest WhatsApp token, someone should write a book about it some day..*
- *[Tarek Galal](https://github.com/tgalal) for providing the latest WhatsApp functionality in yowsup*
- *[Atans](https://github.com/atans) and*
- *[Jonathan Williamson](https://github.com/jonnywilliamson) for additional fixes*

*- [shirioko](https://github.com/shirioko)*

---

### What is WhatsApp?

[](#what-is-whatsapp)

According to [the company](http://www.whatsapp.com/):

> “WhatsApp Messenger is a cross-platform mobile messenger that replaces SMS and works through the existing internet data plan of your device. WhatsApp is available for iPhone, BlackBerry, Android, Windows Phone, Nokia Symbian60 &amp; S40 phones. Because WhatsApp Messenger uses the same internet data plan that you use for email and web browsing, there is no cost to message and stay in touch with your friends.”

Late 2011 numbers: 1 billion messages per day, ~20 million users.

### Modified XMPP

[](#modified-xmpp)

WhatsApp uses some sort of customized XMPP server, named internally as FunXMPP, which is basically some extended proprietary version.

### Login procedure

[](#login-procedure)

Much like XMPP, WhatsApp uses JID (jabber id) and password to successfully login to the service. The password is generated by the server and received upon registration.

The JID is a concatenation between your country’s code and mobile number.

Initial login uses Digest Access Authentication.

### Message sending

[](#message-sending)

Messages are basically sent as TCP packets, following WhatsApp’s own format (unlike what’s defined in XMPP RFCs).

Messages are application level encrypted using RC4 keystreams

### Multimedia Message sending

[](#multimedia-message-sending)

Photos, Videos and Audio files shared with WhatsApp contacts are HTTP-uploaded to a server before being sent to the recipient(s) along with Base64 thumbnail of media file (if applicable) along with the generated HTTP link as the message body.

### Event system

[](#event-system)

WhatsApi uses an event manager (created by [facine](https://github.com/facine)) which allows you to respond to certain events.

List of events and example code on how to bind an event handler:

FAQ
===

[](#faq)

- **What’s with the hex chars floating all over the code?**

    Mostly WhatsApp’s proprietary control chars/commands, or formatted data according to their server’s specifications, stored in predefined dictionaries within the clients.
- **What’s your future development plans?**

    We don’t have any.
- **Would it run over the web?**

    We’ve tested a slightly-modified version on top of Tornado Web Server and worked like a charm, however, building a chat client is a bit tricky, do your research.
- **Can I receive chats?**

    Indeed, using the same socket-receiving mechanism. But you have to parse the incoming data. Parsing functions aren’t included in this release, maybe in the next one?
- **I think the code is messy.**

    It’s working.
- **How can I obtain my password?**

    Register a number using WhatsAPI or intercept your phone's password using MissVenom

NOTES
=====

[](#notes)

- This proof of concept is extensible to contain every feature that make a fully-fledged client, similar to the official ones, actually could be even better.
- During the two weeks of analysis of service mechanisms, we stumbled upon serious design and security flaws (they fixed some of them since 2011). For a company with such massive user base, we expected better practises and engineering.

License
=======

[](#license)

MIT - refer to the source code for the extra line.

Venomous
========

[](#venomous)

Team of Bahraini Developers.

Ahmed Moh'd ([fb.com/ahmed.mhd](https://www.facebook.com/ahmed.mhd)) and Ali Hubail ([@hubail](https://twitter.com/hubail)) contributed to this release.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab86ac05d7853e7ef806fd027f5c778329c265841ca3634fb59f7ae3d1b91066?d=identicon)[sintret](/maintainers/sintret)

---

Top Contributors

[![shirioko](https://avatars.githubusercontent.com/u/1610953?v=4)](https://github.com/shirioko "shirioko (320 commits)")[![facine](https://avatars.githubusercontent.com/u/78108?v=4)](https://github.com/facine "facine (68 commits)")[![cdesjardins](https://avatars.githubusercontent.com/u/1149188?v=4)](https://github.com/cdesjardins "cdesjardins (28 commits)")[![mgp25](https://avatars.githubusercontent.com/u/5390120?v=4)](https://github.com/mgp25 "mgp25 (27 commits)")[![jonnywilliamson](https://avatars.githubusercontent.com/u/2513663?v=4)](https://github.com/jonnywilliamson "jonnywilliamson (26 commits)")[![Bashin](https://avatars.githubusercontent.com/u/5457347?v=4)](https://github.com/Bashin "Bashin (23 commits)")[![veno](https://avatars.githubusercontent.com/u/2384212?v=4)](https://github.com/veno "veno (22 commits)")[![atans](https://avatars.githubusercontent.com/u/2189764?v=4)](https://github.com/atans "atans (16 commits)")[![hubail](https://avatars.githubusercontent.com/u/17515?v=4)](https://github.com/hubail "hubail (16 commits)")[![CodersBrothers](https://avatars.githubusercontent.com/u/2166523?v=4)](https://github.com/CodersBrothers "CodersBrothers (12 commits)")[![ardianys](https://avatars.githubusercontent.com/u/196382?v=4)](https://github.com/ardianys "ardianys (11 commits)")[![SikiFn](https://avatars.githubusercontent.com/u/2743862?v=4)](https://github.com/SikiFn "SikiFn (10 commits)")[![adlerweb](https://avatars.githubusercontent.com/u/1146482?v=4)](https://github.com/adlerweb "adlerweb (8 commits)")[![pastoso](https://avatars.githubusercontent.com/u/5256966?v=4)](https://github.com/pastoso "pastoso (8 commits)")[![KSas](https://avatars.githubusercontent.com/u/5921364?v=4)](https://github.com/KSas "KSas (6 commits)")[![arthursc](https://avatars.githubusercontent.com/u/2151026?v=4)](https://github.com/arthursc "arthursc (5 commits)")[![Phhere](https://avatars.githubusercontent.com/u/1415280?v=4)](https://github.com/Phhere "Phhere (5 commits)")[![reneraab](https://avatars.githubusercontent.com/u/1470363?v=4)](https://github.com/reneraab "reneraab (5 commits)")[![xX7](https://avatars.githubusercontent.com/u/5272979?v=4)](https://github.com/xX7 "xX7 (4 commits)")[![ggodlewski](https://avatars.githubusercontent.com/u/818238?v=4)](https://github.com/ggodlewski "ggodlewski (4 commits)")

### Embed Badge

![Health badge](/badges/sintret-whatsapp/health.svg)

```
[![Health](https://phpackages.com/badges/sintret-whatsapp/health.svg)](https://phpackages.com/packages/sintret-whatsapp)
```

###  Alternatives

[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37549.4k](/packages/beyondcode-laravel-favicon)[nex/yii2-chosen

Bootstrap Chosen widget for Yii2

28100.0k](/packages/nex-yii2-chosen)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
