smsbox/php-sdk

Send SMS message and more from your application with the SMSBOX PHP SDK

Installs: 25

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/smsbox/php-sdk

v1.1.0 2025-11-06 16:24 UTC

This package is auto-updated.

Last update: 2026-01-06 16:50:23 UTC


README

PHP Lint & Tests License: MIT

The SMSBOX logo

The SMSBOX PHP SDK provides a simple and efficient way to send SMS messages directly from your PHP applications.
Whether you are sending alerts, notifications, or marketing messages, this SDK makes the process fast and easy to integrate.

For more information, visit the official website: SMSBOX

⚠️ Requirements

  • PHP 7.4+ (compatible with PHP 8.x)
  • Composer

📖 Documentation

For detailed information about the SMSBOX Sending SMS API parameters, see the official documentation: SMS API.

✉️ Features

  • Send SMS messages quickly and reliably, customizable sender ID, scheduling, etc.

⚙️ Installation

Install via Composer:

composer require smsbox/php-sdk

⚡ Quick Start

<?php

require __DIR__ . '/vendor/autoload.php';

use Smsbox\SmsboxClient;
use Smsbox\Options\SMS\SmsOptions;
use Smsbox\Messages\SmsMessage;
use Smsbox\Enum\SMS\Strategy;

try {
    $client = new SmsboxClient(SMSBOX_API_KEY);

    $message = new SmsMessage(
        ['+336XXXXXXXX'],
        'Hello! This is a test message.'
    );

    $options = (new SmsOptions());
    ->strategy(Strategy::MARKETING);

    $message->options($options);

    $response = $client->sendSms($message);
    echo 'Message sent successfully. Reference ID: ' . $response['refId'] . PHP_EOL;

} catch (GuzzleException|SmsboxException $e) {
    echo 'Error sending OTP: ' . $e->getMessage() . PHP_EOL . 'Code: ' . $e->getCode();
}