PHPackages                             carlosio/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. carlosio/whatsapp

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

carlosio/whatsapp
=================

A PHP library for sending WhatsApp messages

2014028[1 PRs](https://github.com/carlosbuenosvinos/php-whatsapp-api/pulls)PHP

Since Dec 24Pushed 10y ago8 watchersCompare

[ Source](https://github.com/carlosbuenosvinos/php-whatsapp-api)[ Packagist](https://packagist.org/packages/carlosio/whatsapp)[ RSS](/packages/carlosio-whatsapp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\###September 29 Note:

> Development to be resumed, let's pretend that nothing was happened.

For recent changes, refer to the [Change Log](https://github.com/venomous0x/WhatsAPI/blob/master/CHANGELOG.md)

WhatsAPI
========

[](#whatsapi)

Interface to WhatsApp Messenger

---

### 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 hashed and happened to be an MD5’d, reversed-version of the mobile’s IMEI (International Mobile Equipment Identity) or equivalent unique ID, stored in servers upon account creation and used transparently everytime the client connects the server.

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).

Despite the usage of SSL-like communication, messages are being sent in plain-text format.

### 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.

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?**

It depends on your platform, with Android for example, you can use TelephonyManager

```
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
```

```
tm.getDeviceId();
```

With the sufficent permissions of course

```

```

#### Password Overview

[](#password-overview)

- **Android**: MD5 hash of reversed IMEI (Credit: [WhatsAPI Original Authors](https://github.com/venomous0x/WhatsAPI#venomous))
- **iOS**: MD5 hash of the MAC address repeated twice (Credit: [Ezio Amodio](http://www.ezioamodio.it/?p=29))
- **Windows Phone**: MD5 hash of reversed DeviceUniqueId (Credit: [Robe Fernández](http://blog-robefernandez.blogspot.com.es/2012/11/know-your-whatsapp-password-on-windows.html))

Applications
============

[](#applications)

- [WhatsAppify](http://www.whatsappify.com/) (as of november 2012 closed beta. Only delivering WhatsApp messages to Telepienso customers when their parcel is assigned a tracking number.)

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.
- Perfectly working as PHP and JAVA ports.

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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor3

3 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://avatars.githubusercontent.com/u/351553?v=4)[Carlos Buenosvinos](/maintainers/carlosbuenosvinos)[@carlosbuenosvinos](https://github.com/carlosbuenosvinos)

---

Top Contributors

[![cdesjardins](https://avatars.githubusercontent.com/u/1149188?v=4)](https://github.com/cdesjardins "cdesjardins (28 commits)")[![hubail](https://avatars.githubusercontent.com/u/17515?v=4)](https://github.com/hubail "hubail (14 commits)")[![veno](https://avatars.githubusercontent.com/u/2384212?v=4)](https://github.com/veno "veno (11 commits)")[![atans](https://avatars.githubusercontent.com/u/2189764?v=4)](https://github.com/atans "atans (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)")[![poliva](https://avatars.githubusercontent.com/u/1238981?v=4)](https://github.com/poliva "poliva (4 commits)")[![dleivag](https://avatars.githubusercontent.com/u/1720990?v=4)](https://github.com/dleivag "dleivag (3 commits)")[![beldar](https://avatars.githubusercontent.com/u/680743?v=4)](https://github.com/beldar "beldar (2 commits)")[![zstars](https://avatars.githubusercontent.com/u/392406?v=4)](https://github.com/zstars "zstars (1 commits)")[![dannydamianus](https://avatars.githubusercontent.com/u/2785361?v=4)](https://github.com/dannydamianus "dannydamianus (1 commits)")[![lowlevel-mboton](https://avatars.githubusercontent.com/u/35785353?v=4)](https://github.com/lowlevel-mboton "lowlevel-mboton (1 commits)")[![meandrex](https://avatars.githubusercontent.com/u/2753595?v=4)](https://github.com/meandrex "meandrex (1 commits)")[![need80](https://avatars.githubusercontent.com/u/153939460?v=4)](https://github.com/need80 "need80 (1 commits)")[![vkotovv](https://avatars.githubusercontent.com/u/1636249?v=4)](https://github.com/vkotovv "vkotovv (1 commits)")[![wertarbyte](https://avatars.githubusercontent.com/u/172527?v=4)](https://github.com/wertarbyte "wertarbyte (1 commits)")[![alexandresaiz](https://avatars.githubusercontent.com/u/239624?v=4)](https://github.com/alexandresaiz "alexandresaiz (1 commits)")

### Embed Badge

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

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

###  Alternatives

[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[eduardokum/laravel-mail-auto-embed

Library for embed images in emails automatically

1702.0M5](/packages/eduardokum-laravel-mail-auto-embed)

PHPackages © 2026

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