PHPackages                             broadcastbuddy/buddy-php - 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. broadcastbuddy/buddy-php

ActiveLibrary

broadcastbuddy/buddy-php
========================

Official PHP SDK for the BroadcastBuddy WhatsApp API

10PHP

Since Feb 7Pushed 3mo agoCompare

[ Source](https://github.com/Broadcast-Buddy/broadcastbuddy-php-sdk)[ Packagist](https://packagist.org/packages/broadcastbuddy/buddy-php)[ RSS](/packages/broadcastbuddy-buddy-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

BroadcastBuddy PHP SDK
======================

[](#broadcastbuddy-php-sdk)

This SDK allows developers to interact with the BroadcastBuddy WhatsApp API using a simple, single file PHP client.

It is designed to be lightweight, secure, and easy to integrate into any PHP project.

---

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- cURL extension enabled

No Composer. No external dependencies.

---

Installation
------------

[](#installation)

### Step 1. Install the SDK

[](#step-1-install-the-sdk)

Install `Broadcast Buddy` in your project.

Example:

```
composer require broadcastbuddy/buddy-php

```

---

### Step 2. Include the SDK

[](#step-2-include-the-sdk)

```
require_once 'vendor/autoload.php';
```

---

Initialization
--------------

[](#initialization)

Create a new instance using your **public API key**.

```
use BroadcastBuddy\BroadcastBuddy;

$bb = new BroadcastBuddy('your_api_key_here');

$apiKey = 'your_api_key_here';
$bb = new BroadcastBuddy($apiKey);
```

---

WhatsApp API Usage
------------------

[](#whatsapp-api-usage)

### Start a WhatsApp Session

[](#start-a-whatsapp-session)

```
$response = $bb->startSession();
print_r($response);
```

### Restart Session

[](#restart-session)

```
$response = $bb->restartSession();
print_r($response);
```

### Terminate Session

[](#terminate-session)

```
$response = $bb->terminateSession();
print_r($response);
```

### Check Session Status

[](#check-session-status)

```
$response = $bb->checkStatus();
print_r($response);
```

---

Get Client Information
----------------------

[](#get-client-information)

```
$response = $bb->getClientInfo();
print_r($response);
```

---

Get QR Code
-----------

[](#get-qr-code)

```
$response = $bb->getQrImage();
print_r($response);
```

---

Send Messages
-------------

[](#send-messages)

### Send Text Message

[](#send-text-message)

```
$response = $bb->sendText(
    '233XXXXXXXX@c.us',
    'Hello from BroadcastBuddy'
);
print_r($response);
```

### Send Media Message

[](#send-media-message)

```
$response = $bb->sendMedia(
    '233XXXXXXXX@c.us',
    $base64Data,
    'image/png',
    'image.png',
    'Optional caption'
);
print_r($response);
```

### Send Poll

[](#send-poll)

```
$response = $bb->sendPoll(
    '233XXXXXXXX@c.us',
    'Your favorite language?',
    ['PHP', 'JavaScript', 'Python'],
    false
);
print_r($response);
```

### Send Location

[](#send-location)

```
$response = $bb->sendLocation(
    '233XXXXXXXX@c.us',
    5.6037,
    -0.1870,
    'Accra'
);
print_r($response);
```

---

Fetch Chats and Contacts
------------------------

[](#fetch-chats-and-contacts)

### Get Chats

[](#get-chats)

```
$response = $bb->getChats();
print_r($response);
```

### Get Contacts

[](#get-contacts)

```
$response = $bb->getContacts();
print_r($response);
```

---

Error Handling
--------------

[](#error-handling)

Wrap calls in a try catch block for safe error handling.

```
try {
    $bb->sendText('233XXXXXXXX@c.us', 'Hello');
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage();
}
```

---

API Base URL
------------

[](#api-base-url)

All requests are sent to:

```
https://broadcastbuddy.app/api/v1

```

Authentication is handled automatically using your API key in the endpoint path.

---

File Structure
--------------

[](#file-structure)

```
/project-root/
├── BroadcastBuddy.php
└── index.php

```

---

Security Notes
--------------

[](#security-notes)

- Never expose your API key in frontend code
- Always store API keys in environment variables
- Rotate keys if compromised

---

Support
-------

[](#support)

For API documentation and updates, visit

For technical support, contact the BroadcastBuddy team.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance54

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b8b19f6ecd22aa4c9362d8d509ee8e344bc1a7e16012a7aceab9e9c34733046?d=identicon)[claudeamadu](/maintainers/claudeamadu)

---

Top Contributors

[![claudeamadu](https://avatars.githubusercontent.com/u/75040193?v=4)](https://github.com/claudeamadu "claudeamadu (21 commits)")

### Embed Badge

![Health badge](/badges/broadcastbuddy-buddy-php/health.svg)

```
[![Health](https://phpackages.com/badges/broadcastbuddy-buddy-php/health.svg)](https://phpackages.com/packages/broadcastbuddy-buddy-php)
```

PHPackages © 2026

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