PHPackages                             sms-proxima/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. sms-proxima/sdk

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

sms-proxima/sdk
===============

Official PHP SDK for the SMS Proxima API — send SMS, track delivery receipts and manage blacklists

v1.0.0(2mo ago)02MITPHPPHP &gt;=7.4

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/SMS-Proxima/sms-proxima-php-sdk)[ Packagist](https://packagist.org/packages/sms-proxima/sdk)[ Docs](https://sms-proxima.com)[ RSS](/packages/sms-proxima-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

SMS Proxima PHP SDK
===================

[](#sms-proxima-php-sdk)

SDK PHP officiel pour l'[API SMS Proxima](https://sms-proxima.com/api-sms).

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

[](#installation)

```
composer require sms-proxima/sdk
```

**Prérequis :** PHP &gt;= 7.4, extensions `curl` et `json`.

---

Démarrage rapide
----------------

[](#démarrage-rapide)

```
use SmsProxima\SmsProxima;

$sms = new SmsProxima('VOTRE_TOKEN');

// Envoyer un SMS
$result = $sms->send('33612345678', 'BOUTIQUE', 'Votre commande est confirmée.');

echo $result['ticket'];  // api-42-1712345678
echo $result['credits']; // crédits restants
```

---

Utilisation
-----------

[](#utilisation)

### Test de connexion

[](#test-de-connexion)

```
$response = $sms->ping();
// ['message' => 'Authentifié avec succès', 'user' => [...]]
```

### Crédits disponibles

[](#crédits-disponibles)

```
$credits = $sms->credits(); // int
```

### Envoi SMS

[](#envoi-sms)

```
// Envoi simple
$sms->send('33612345678', 'EXPEDITEUR', 'Votre message');

// Envoi multiple
$sms->send(['33612345678', '33687654321'], 'EXPEDITEUR', 'Votre message');

// Avec options
$sms->send('33612345678', 'EXPEDITEUR', 'Votre message', [
    'stop'           => 1,              // Mention STOP (défaut : 1)
    'timeToSend'     => '2026-03-15 10:00', // Envoi programmé
    'sandbox'        => 1,              // Mode test (aucun SMS envoyé, aucun crédit débité)
    'idempotencyKey' => 'uuid-v4-ici',  // Anti double-envoi
]);
```

### Comptage de caractères

[](#comptage-de-caractères)

```
$count = $sms->count('Mon message');
// ['nb_sms' => 1, 'nb_caracteres' => 147]
```

### Historique des campagnes

[](#historique-des-campagnes)

```
$campaigns = $sms->campaigns();
$campaigns = $sms->campaigns(2); // page 2
```

### Accusés de réception par destinataire

[](#accusés-de-réception-par-destinataire)

```
$deliveries = $sms->deliveries('api-42-1712345678');
// Retourne la liste paginée des AR reçus pour ce ticket
```

### Blacklist

[](#blacklist)

```
// Lister
$list = $sms->getBlacklist();

// Ajouter
$sms->addToBlacklist('33612345678');

// Supprimer (impossible si le numéro a répondu STOP)
$sms->removeFromBlacklist('33612345678');
```

---

Gestion des erreurs
-------------------

[](#gestion-des-erreurs)

```
use SmsProxima\SmsProxima;
use SmsProxima\Exceptions\AuthenticationException;
use SmsProxima\Exceptions\InsufficientCreditsException;
use SmsProxima\Exceptions\ValidationException;
use SmsProxima\Exceptions\SmsProximaException;

try {
    $result = $sms->send('33612345678', 'BOUTIQUE', 'Votre commande est confirmée.');

} catch (InsufficientCreditsException $e) {
    echo 'Crédits insuffisants. Disponibles : ' . $e->getAvailableCredits();
    echo ' / Requis : ' . $e->getRequiredCredits();

} catch (AuthenticationException $e) {
    echo 'Clé API invalide ou compte non validé.';

} catch (ValidationException $e) {
    echo 'Erreur de validation : ' . $e->getMessage();
    print_r($e->getErrors());

} catch (SmsProximaException $e) {
    echo 'Erreur API : ' . $e->getMessage();
    echo ' (code : ' . $e->getApiCode() . ')';
}
```

---

Webhook — accusés de réception
------------------------------

[](#webhook--accusés-de-réception)

Configurez votre URL webhook depuis votre [espace API](https://sms-proxima.com/dashboard/api). SMS Proxima enverra un `POST JSON` sur votre endpoint à chaque accusé de réception.

**Exemple de payload reçu :**

```
{
  "version": "v1",
  "event": "delivery.receipt",
  "event_id": "1711175235",
  "emitted_at": "2026-03-01T10:00:00+00:00",
  "campaign_id": 1234,
  "message": {
    "to": "33612345678"
  },
  "delivery": {
    "status": "delivered",
    "status_code": "0",
    "error_code": "000",
    "received_at": "2026-03-01T09:59:55+00:00"
  }
}
```

**Votre endpoint doit répondre HTTP 2xx dans les 6 secondes.**En cas d'échec, la requête est rejouée jusqu'à 8 fois sur 24h. Utilisez `event_id` pour détecter les doublons éventuels.

---

Licence
-------

[](#licence)

MIT — voir [LICENSE](LICENSE)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance85

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

76d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd7eba757ee7a59ac21960553b0496cd6d417850930580023a17e88c42df86d5?d=identicon)[SMS-Proxima](/maintainers/SMS-Proxima)

---

Top Contributors

[![SMS-Proxima](https://avatars.githubusercontent.com/u/72754815?v=4)](https://github.com/SMS-Proxima "SMS-Proxima (3 commits)")

---

Tags

apifrancenotificationsphpsdksmsphpapinotificationsmsproxima

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sms-proxima-sdk/health.svg)

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

###  Alternatives

[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[joetannenbaum/phpushbullet

PHP API wrapper for Pushbullet.

3146.4k4](/packages/joetannenbaum-phpushbullet)[ghasedak/php

ghasedak sms gateway package for PHP

2044.3k7](/packages/ghasedak-php)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

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