PHP library for interract with WhatsApp api
Switch branches/tags
Nothing to show
Clone or download
Latest commit 5ac6e91 Jul 17, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Initial commit Jul 11, 2018
src Some fixes Jul 13, 2018
tests Some fixes Jul 13, 2018
composer.json Initial commit Jul 11, 2018
phpunit.xml.dist Initial commit Jul 11, 2018 Update Jul 17, 2018

PHP library for WhatsApp api

Latest Version Total Downloads

Lightweight PHP library for interact with WhatsApp api provided by


The recommended way to install is through Composer.

# Install Composer
curl -sS | php

Next, run the Composer command to install the latest stable version:

php composer.phar require chatapi/whatsApp

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update library using composer:

composer.phar update


Create client instance

$client = Client::getInstance([
   'url' => 'your_url',
   'token' => 'your_token'

Send message

   'phone' => '78005553535',
   'body' => 'Hi there!'

Send file

$data = $client->sendFile([
   'phone' => '78005553535', 
   'body' => 'some_file',      // file in base64
   'filename' => 'sample.jpg'

Create group

   'New chat', ['78005553535'], 'First message'

Get list of all incoming messages

$data = $client->getMessages();

Get not sent messages queue

$data = $client->getMessagesQueue();

Clear not sent messages queue

$data = $client->clearMessagesQueue();

Get account status

$data = $client->getStatus();

Get QR-code

$data = $client->getQrCode();

Set webhook

$data = $client->setWebHook('http://<some_url>');

Get webhook

$data = $client->getWebHook();

Reboot application

$data = $client->reboot();


$data = $client->logout();