PHPackages                             cachesistemas/classephpapiwame - 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. [API Development](/categories/api)
4. /
5. cachesistemas/classephpapiwame

AbandonedArchivedLibrary[API Development](/categories/api)

cachesistemas/classephpapiwame
==============================

Classe PHP para comunicação com api-wa.me

v2.0.4(3y ago)12226[2 issues](https://github.com/raphaelvserafim/classe-php-api-wa.me/issues)1MITPHP

Since May 23Pushed 1y ago2 watchersCompare

[ Source](https://github.com/raphaelvserafim/classe-php-api-wa.me)[ Packagist](https://packagist.org/packages/cachesistemas/classephpapiwame)[ Docs](https://github.com/raphaelvserafim/classe-php-api-wa.me)[ RSS](/packages/cachesistemas-classephpapiwame/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)DependenciesVersions (10)Used By (1)

WhatsApp API - PHP
==================

[](#whatsapp-api---php)

##### Gerar Instância Key:

[](#gerar-instância-key)

Acessar: [api-wa.me](https://api-wa.me)

[Swagger](https://doc.api-wa.me/)

[Postman](https://documenter.getpostman.com/view/27660901/2sA3Qs9s7K/)

Installing via composer
-----------------------

[](#installing-via-composer)

```
composer require raphaelvserafim/client-php-api-wa-me

```

### EXAMPLES

[](#examples)

##### WHATSAPP

[](#whatsapp)

```
use Api\Wame\WhatsApp;

include_once 'vendor/autoload.php';

$whatsapp     = new WhatsApp(
    ["server" => "API server",
    "key" => "Your Key Instance"]
    );
```

#### Get webhook

[](#get-webhook)

```
    $whatsapp->constructWebhook();
    $whatsapp->from->remoteJid; //  number that sent message
    $whatsapp->from->messageType; // video | text | audio| image | sticker | document| reaction | liveLocation |
    $whatsapp->from->msgId;
    $whatsapp->from->pushName;
    $whatsapp->from->text;
```

#### Exemple

[](#exemple)

```
if ($whatsapp->from->messageType === "text" && $whatsapp->from->text === "Hi") {
  $whatsapp->sendText($whatsapp->from->remoteJid, "Hello!");
}
```

#### Get QrCode HTML

[](#get-qrcode-html)

```
echo $whatsapp->connect();
```

#### Infor Instance

[](#infor-instance)

```
echo $whatsapp->inforInstance();
```

#### Update Webhook

[](#update-webhook)

```
$body = [
"allowWebhook" => false,
"webhookMessage" => "",
"webhookGroup" => "",
"webhookConnection" => "",
"webhookQrCode" => "",
"webhookMessageFromMe"=>"",
"webhookHistory"=>""
];
echo $whatsapp->updateWebhook($body);
```

#### Logout

[](#logout)

```
echo $whatsapp->logout();
```

Actions
-------

[](#actions)

### Get List Contacts

[](#get-list-contacts)

```
echo $whatsapp->listContacts();
```

### Get Profile Pic

[](#get-profile--pic)

```
echo $whatsapp->profilePic('556696852025');
```

### Update Profile Name

[](#update-profile-name)

```
echo $whatsapp->updateProfileName('Raphael Serafim');
```

### Update Profile And Group Picture

[](#update-profile-and-group--picture)

```
$url =''; // url image
echo $whatsapp->updateProfilePicture($url);
```

### Download Media

[](#download-media)

```
    $body = [
    "mediaKey" => "",
    "directPath" => "",
    "url" => "",
    ] ;
$type = "image";// video | audio| image | sticker | document|
echo $whatsapp->downloadMediaMessage($type, $body);
```

Send Message
------------

[](#send-message)

### send Presence

[](#send-presence)

```
$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us
$status = 'composing';   // unavailable | available | composing | recording | paused
echo $whatsapp->sendPresence($to, $status);
```

### send Text

[](#send-text)

```
$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us
$text   = 'Hi';
echo $whatsapp->sendText($to, $text);
```

### send Audio

[](#send-audio)

```
$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us
$url    = ''; // your MP3 or OGG audio URL
echo $whatsapp->sendAudio($to, $url);
```

### send Media

[](#send-media)

### Send Button

[](#send-button)

```
  $body = [
   "to" => "556696852025",
   "title" => "Are you enjoying ?",
   "footer" => "choose an option",
   "buttons" => [
       [
           "id" => "click_1",
           "text" => "Yes"
       ],
       [
           "id" => "click_2",
           "text" => "No"
       ]
   ]
];
echo $whatsapp->sendButton($body);
```

### Send List

[](#send-list)

```
  $body = [
   "to" => "556696852025",
   "buttonText" => "Menu",
   "text" => "string",
   "title" => "Menu",
   "description" => "Description",
   "footer" => "footer",
   "sections" => [
       [
           "title" => "Pizza",
           "rows" => [
               [
                   "title" => "Pizza 01",
                   "description" => "Example pizza 01",
                   "rowId" => "1"
               ]
           ]
       ]
   ]
];
echo $whatsapp->sendList($body);
```

### send Contact

[](#send-contact)

```
$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us
$name   = 'CACHE SISTEMAS';
$number = '+556696883327';
echo $whatsapp->sendContact($to, $name, $number);
```

### send Location

[](#send-location)

```
$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us
$lat    =  37.7749;
$lon    =  -122.4194;
$address = '123 Main St, San Francisco, CA';
echo $whatsapp->sendLocation($to, $lat, $lon, $address);
```

### send Reaction

[](#send-reaction)

```
$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us
$text   =  '😘';
$msgId  =  '';
echo $whatsapp->sendReaction($to, $text, $msgId);
```

Group
-----

[](#group)

### Get list Group

[](#get-list-group)

```
   echo $whatsapp->listGroup();
```

### Get infor Group

[](#get-infor-group)

```
   $group_id = '123456789@g.us';
   echo $whatsapp->inforGroup($group_id);
```

### Get Invite Code Group

[](#get-invite-code-group)

```
   $group_id = '123456789@g.us';
   echo $whatsapp->groupInviteCode($group_id);
```

### create Group

[](#create-group)

```
   $name = 'API PHP WhatsApp';
   $participants = ['556696852025'];
   echo $whatsapp->createGroup($name, $participants);
```

### add Participants Group

[](#add-participants-group)

```
   $group_id     = '123456789@g.us';
   $participants = ['556696852025'];
   echo $whatsapp->addParticipantsGroup($group_id, $participants);
```

### Promote Participants Group Admin

[](#promote-participants-group-admin)

```
   $group_id     = '123456789@g.us';
   $participants = ['556696852025'];
   $action = "promote"; // demote
   echo $whatsapp->promoteParticipantsGroup($group_id, $participants, $action);
```

### Remove Participants Group

[](#remove-participants-group)

```
   $group_id     = '123456789@g.us';
   $participants = ['556696852025'];
   echo $whatsapp->removeParticipantsGroup($group_id, $participants);
```

### Leave Group

[](#leave-group)

```
   $group_id     = '123456789@g.us';
   echo $whatsapp->leaveGroup($group_id);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance23

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~4 days

Total

8

Last Release

1252d ago

Major Versions

v1.0.2 → v2.0.02022-11-17

### Community

Maintainers

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

---

Top Contributors

[![raphaelvserafim](https://avatars.githubusercontent.com/u/68257896?v=4)](https://github.com/raphaelvserafim "raphaelvserafim (105 commits)")

---

Tags

apiapi-clientapi-restapi-serverapi-swaggerphpwhatsappwhatsapp-apiwhatsapp-bot

### Embed Badge

![Health badge](/badges/cachesistemas-classephpapiwame/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M479](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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