PHPackages                             trenalyze/trenalyze - 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. trenalyze/trenalyze

ActiveLibrary[API Development](/categories/api)

trenalyze/trenalyze
===================

A whatsApp API for sending whatsapp Messages with your own custom phone number

1.2.3(3y ago)216MITPHPPHP ^7.1.3 || ^8.0

Since May 24Pushed 3y agoCompare

[ Source](https://github.com/Trenalyze/trenalyze-php)[ Packagist](https://packagist.org/packages/trenalyze/trenalyze)[ RSS](/packages/trenalyze-trenalyze/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)DependenciesVersions (8)Used By (0)

trenalyze(PHP) V1.2.3
=====================

[](#trenalyzephp-v123)

[Author](https://treasureuvietobore.com/) | [Docs](https://github.com/Trenalyze/trenalyze-php#readme)

Library Prerequisites
---------------------

[](#library-prerequisites)

1. PHP &gt;= 7X
2. WhatsApp account.
3. Active Token - Get a Token [here](https://trenalyze.com).

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

[](#installation)

Using composer:

```
$ composer require trenalyze/trenalyze
```

**Note:** Add this line of code to your composer.json file

```
"minimum-stability": "dev",
```

In PHP:

**Note:** You'll need to require the Trenalyze PHP Library after installation

```
// Load the full build.
require_once __DIR__ . '/vendor/autoload.php';

use Trenalyze\Trenalyze;
```

API
---

[](#api)

### 1. new Trenalyze(token, sender, true)

[](#1-new-trenalyzetoken-sender-true)

ParamTypeDescriptiontoken`string`Use your Trenalyze Token from your [Dashboard](https://trenalyze.com).sender`interger`Enter the WhatApp Number that has already been scanned on the Trenalyze [Dashboard](https://trenalyze.com).debug`boolean`(OPTIONAL). Default is false. But you can set it to be true and the debug message is passed onto the console.```
// Set The Config
$wa = new Trenalyze(YOUR_TRENALYZE_TOKEN_HERE, YOUR_WHATASPP_NUMBER_HERE, true);
```

**Note:** Phone number should be in the following format `12345678912`, without `+` or any other symbols

### 2. Initialize needed params in an array

[](#2-initialize-needed-params-in-an-array)

ParamTypeDescriptionreceiver`interger`Phone number should be in the international format `2348157002782`, without `+` or any other symbols.message`interger`Enter the desired text message to send.mediaurl`string`(OPTIONAL). **BUT MUST BE DECLARED** This should be a valid media/file link. [Learn More](https://trenalyze.com)buttons`array`(OPTIONAL). **BUT MUST BE DECLARED** You can attach quick replies buttons to your message. [Learn More](https://trenalyze.com)```
// Set the Required Parameters for sending a message
$receiver: '123456789',
$message: 'Hello World',
$mediaurl: 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png',
$buttons: [
    ['index' => 1, 'urlButton' => ['displayText' => 'Visit my website!', 'url' => 'https://trenalyze.com']],
    ['index' => 2, 'callButton' => ['displayText' => 'Call me!', 'phoneNumber' => '+1 (234) 5678-9012']],
    ['index' => 3, 'quickReplyButton' => ['displayText' => 'This is a reply, just like normal buttons!', 'id' => 'id-like-buttons-message']],
];
```

**NOTE:** When not using **mediaurl** and **buttons** set to **NULL**

```
mediaurl: '',
buttons: ''
```

### 3. Initialize SendMessage

[](#3-initialize-sendmessage)

ParamTypeDescriptionreceiver`interger`Phone number should be in the following format `12345678912`, without `+` or any other symbols.message`interger`Enter the desired text message to send.mediaurl`string`(OPTIONAL). **BUT MUST BE DECLARED** This should be a valid media/file link. [Learn More](https://trenalyze.com)buttons`array`(OPTIONAL). **BUT MUST BE DECLARED** You can attach quick replies buttons to your message. [Learn More](https://trenalyze.com)```
// Initialize the send WhatsApp message functions
$res = json_decode($wa->sendMessage($receiver, $message, $buttons, $mediaurl));
```

### 4. Ensure to get the status of step 3 Action

[](#4-ensure-to-get-the-status-of-step-3-action)

```
if ($res->statusCode != 200) {
    echo $res->message;
} else {
    echo 'WhatsApp Message sent successfully;
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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 ~13 days

Recently: every ~20 days

Total

7

Last Release

1369d ago

Major Versions

v0.1.x-dev → 1.0.02022-05-24

### Community

Maintainers

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

---

Top Contributors

[![treasure567](https://avatars.githubusercontent.com/u/52765128?v=4)](https://github.com/treasure567 "treasure567 (44 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M272](/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)
