PHPackages                             axolote-source/messages-sdk - 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. axolote-source/messages-sdk

ActiveLibrary[API Development](/categories/api)

axolote-source/messages-sdk
===========================

SDK for AxMessages integration

13↓66.7%PHP

Since Apr 29Pushed 1mo agoCompare

[ Source](https://github.com/AxoloteSource/messages-sdk)[ Packagist](https://packagist.org/packages/axolote-source/messages-sdk)[ RSS](/packages/axolote-source-messages-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Messages SDK
============

[](#messages-sdk)

SDK for integration with the AxMessages messaging service from Axolote Source. This library facilitates sending WhatsApp messages and emails from Laravel applications.

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

[](#installation)

You can install the package via Composer:

```
composer require axolote-source/messages-sdk
```

Configuration
-------------

[](#configuration)

To use this SDK in Laravel, you can publish the configuration file:

```
php artisan vendor:publish --provider="AxoloteSource\MessagesSdk\AxMessagesServiceProvider" --tag="config"
```

This will create a `config/axMessages.php` file. You can also configure the environment variables in your `.env` file:

```
AXMESSAGES_URL=https://api.ejemplo.com
AXMESSAGES_TOKEN=your-token-here
AXMESSAGES_DEBUG=false
AXMESSAGES_DISABLED=false
```

### Configuration Variables

[](#configuration-variables)

- `AXMESSAGES_URL`: The base URL of the messaging service.
- `AXMESSAGES_TOKEN`: Your authentication token.
- `AXMESSAGES_DEBUG`: (Optional) Enables debug mode (detailed logs).
- `AXMESSAGES_DISABLED`: (Optional) Disables the service globally.

Usage
-----

[](#usage)

The main class `AxoloteSource\MessagesSdk\AxMessages` provides static methods to interact with the services.

### Send WhatsApp with Template

[](#send-whatsapp-with-template)

You can send a WhatsApp message using a predefined template:

```
use AxoloteSource\MessagesSdk\AxMessages;

$to = '521234567890';
$templateName = 'welcome_message';
$variables = [
    [
        'key' => 'user',
        'type' => 'text',
        'value' => 'John Doe',
    ],
]

$response = AxMessages::sendWhatsappTemplate($to, $templateName, $variables);

if ($response) {
    // Message sent successfully
    echo $response->id;
}
```

You can also use the fluid instance:

```
$response = AxMessages::sendWhatsapp()
    ->template($to, $templateName, $variables);
```

### Send Email with Template

[](#send-email-with-template)

To send emails, use the `sendEmailTemplate` method:

```
use AxoloteSource\MessagesSdk\AxMessages;

$data = [
    'to' => 'user@example.com',
    'subject' => 'Welcome',
    'template' => 'welcome_email',
    'params' => [
        [
            'key' => 'name',
            'value' => 'John Doe'
        ]
    ]
];

$response = AxMessages::sendEmailTemplate($data);
```

Or through the instance:

```
$response = AxMessages::sendEmail()->template($data);
```

Testing (Mocking)
-----------------

[](#testing-mocking)

The SDK includes functionality to simulate message sending in testing environments, avoiding real requests.

```
use AxoloteSource\MessagesSdk\AxMessages;

// Activate fake mode
AxMessages::fake();

// These calls will not make real requests
AxMessages::sendWhatsappTemplate('...', '...');

// Verify if fake mode is being used
if (AxMessages::isFake()) {
    // ...
}
```

Debugging
---------

[](#debugging)

You can manually activate debug mode to get more information in the logs in case of an error:

```
AxMessages::sendWhatsapp()->activeDebugMode()->template(...);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance60

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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://avatars.githubusercontent.com/u/15320788?v=4)[Luis Ozuna](/maintainers/LuisOzParr)[@LuisOzParr](https://github.com/LuisOzParr)

---

Top Contributors

[![LuisOzParr](https://avatars.githubusercontent.com/u/15320788?v=4)](https://github.com/LuisOzParr "LuisOzParr (2 commits)")

### Embed Badge

![Health badge](/badges/axolote-source-messages-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/axolote-source-messages-sdk/health.svg)](https://phpackages.com/packages/axolote-source-messages-sdk)
```

###  Alternatives

[facebook/php-business-sdk

PHP SDK for Facebook Business

90923.5M35](/packages/facebook-php-business-sdk)[exsyst/swagger

A php library to manipulate Swagger specifications

35916.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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