Your SMS are sent from your own mobile.See how it works
PLATFORMAPI-first architectureSecure device pairingDelivery visibilityMulti-device controlVersioned documentation
← All integrations
Official PHP SDK · Composer

PHP SMS & WHATSAPP SDK

Send SMS & WhatsApp
from PHP. Use your own mobile.

Install one Composer package and send SMS from your own connected mobile number or send WhatsApp messages from Laravel, Symfony, WordPress, CRON jobs and custom PHP applications.

Composer-readyOne package, PSR-4 autoloadingYour mobile numberSMS leave from your connected phonePHP 7.2+Powered by Guzzle 7
send-message.phpPHP
$composer require
smsmobileapi/smsmobileapi-php
<?php
require __DIR__ . '/vendor/autoload.php';

use SMSMobileAPI\SMSMobileAPI;

$client = new SMSMobileAPI(
    getenv('SMSMOBILEAPI_KEY')
);

$result = $client->sendMessage(
    '+32470000000',
    'Your appointment is confirmed.',
    false,
    true
);
Request acceptedSMS → connected mobile → recipient200
Server-side PHP creates the request. Your connected mobile and SIM perform the SMS delivery.

FROM PHP TO A REAL MOBILE

Your application controls the workflow.
Your connected phone sends the SMS.

The SDK removes repetitive HTTP setup while preserving the core SMSMobileAPI model: business logic stays in PHP and SMS delivery uses the real mobile phone, SIM and number connected to your account.

01
<?php

Your PHP application

Laravel, Symfony, WordPress, a CRON job or custom backend starts the action.

SDK request
02

SMSMobileAPI

Authenticates the request, applies routing and keeps the activity visible.

secure routing
03

Your mobile + SIM

The connected phone uses its existing number and mobile plan to send the SMS.

mobile network
04

Your contact

The recipient receives a normal SMS and can reply to the number they already know.

QUICK START

From Composer to a controlled test in four steps.

Use a test recipient you control. Keep the API key outside source control, verify that the mobile is online and inspect the returned array before connecting the call to a live business event.

  1. 1
    Connect your mobileInstall SMSMobileAPI, sign in and confirm that the device is online.
  2. 2
    Install the packageRun Composer in the root of your PHP project.
  3. 3
    Protect the API keyLoad it from server configuration or an environment variable.
  4. 4
    Send and verifyCheck both the returned result and the SMSMobileAPI activity log.
Terminal
$ composer require smsmobileapi/smsmobileapi-php
send-sms.php
<?php

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

use SMSMobileAPI\SMSMobileAPI;

$apiKey = getenv('SMSMOBILEAPI_KEY');
$client = new SMSMobileAPI($apiKey);

$response = $client->sendMessage(
    '+32470000000',
    'Hello from PHP!',
    false, // sendWA
    true   // sendSMS
);

print_r($response);
Use a protected environment variablePHP ≥ 7.2

ONE METHOD, CLEAR CHANNEL CONTROL

Choose SMS, WhatsApp or both for each call.

The official client exposes sendMessage(). Two Boolean parameters select WhatsApp and SMS, while an optional fifth parameter schedules the request with a Unix timestamp.

SMS

Send from your connected mobile

Use false, true. The SMS is routed to your connected phone and sent with its SIM and existing mobile number.

$client->sendMessage(
  $to, $message,
  false, true
);
Read SMS documentation →
WHATSAPP

Send through linked WhatsApp

Use true, false. Connect WhatsApp first from the dashboard and verify the connection before automating messages.

$client->sendMessage(
  $to, $message,
  true, false
);
Read WhatsApp documentation →
SCHEDULE

Program a future message

Pass a Unix timestamp as the fifth parameter. Store the intended timezone explicitly in your application before creating it.

$client->sendMessage(
  $to, $message,
  false, true, $timestamp
);
Review endpoint parameters →

PHP WHERE YOUR BUSINESS ALREADY RUNS

One lightweight client for web applications, jobs and internal tools.

The SDK fits behind your existing application layer. Your code decides when to communicate, which data to include and how to handle the result.

LA

Laravel

Wrap the client in a service and call it from jobs, listeners, controllers or your notification layer.

Queues · Events · Services
SF

Symfony

Register the client as a service, inject it where needed and keep the API key in protected configuration.

DI · Messenger · Console
WP

WordPress

Add SMS or WhatsApp actions to a custom plugin, form workflow, WooCommerce extension or administrative tool.

Hooks · Plugins · WooCommerce
CR

CRON & CLI

Send operational alerts, scheduled reminders or controlled batch notifications from server-side jobs.

Monitoring · Tasks · Alerts
Composer dependency manager logo

STANDARD PHP TOOLING

A small dependency that belongs in your normal deployment workflow.

The package uses PSR-4 autoloading and Guzzle 7. Composer resolves the dependency, your existing autoloader loads the client and your application keeps control of validation, business rules and error handling.

  • Packagesmsmobileapi/smsmobileapi-php
  • NamespaceSMSMobileAPI\SMSMobileAPI
  • RuntimePHP 7.2 or newer
  • HTTP clientGuzzle 7
  • LicenseMIT
Inspect the source on GitHub ↗

PRODUCTION CHECKLIST

Make the integration reliable before increasing traffic.

The SDK simplifies the call, but your application remains responsible for secure credentials, clean input, controlled retry behavior and useful operational logs.

  • 01
    Never commit the API keyUse environment variables or your server’s secret manager.
  • 02
    Normalize recipientsStore phone numbers in an international format and validate them before sending.
  • 03
    Inspect every responseDo not treat a PHP call without an exception as proof of final delivery.
  • 04
    Use bounded retriesAvoid duplicate messages and never create an uncontrolled retry loop.
  • 05
    Monitor the connected mobileSMS delivery depends on the selected phone being online and correctly configured.
  • 06
    Test channel behavior separatelyValidate SMS, WhatsApp and scheduled requests with controlled recipients.

PRACTICAL PHP USE CASES

Put mobile communication exactly where the event happens.

Customer portals

Confirm account actions, appointments and service updates from the backend that already knows the customer context.

Order workflows

Send payment, preparation, shipping or pickup updates from e-commerce and ERP processes.

!

Operational alerts

Notify a real phone when monitoring, backups, infrastructure or important business jobs require attention.

CRM follow-up

Trigger personalized SMS or WhatsApp from lead, ticket and customer lifecycle events.

PHP SDK FAQ

What developers need to know before shipping.

The SDK is the PHP client. The channel connection, account configuration and operational activity remain available through SMSMobileAPI.

Is this an official Composer package?

Yes. Install smsmobileapi/smsmobileapi-php with Composer. The public source code is available in the official SMSMobileAPI GitHub repository.

Does an SMS really use my own mobile number?

Yes. For native mobile SMS, the request is routed through the phone connected to your SMSMobileAPI account. Its SIM and existing number perform the send operation.

Can the SDK send WhatsApp messages?

Yes. The sendWA parameter enables WhatsApp. Your WhatsApp connection must first be configured and active in the dashboard.

Can I use it in Laravel, Symfony or WordPress?

Yes. It is a normal Composer library with PSR-4 autoloading. Keep it behind server-side application code and adapt the client to the service structure of your framework.

Does the package expose every SMSMobileAPI endpoint?

The current PHP client focuses on sending SMS and WhatsApp messages, including optional scheduling. Use the REST API documentation for received messages, call activity and the platform’s other specialized endpoints.

Where should I store the API key?

Store it in protected server configuration or an environment variable. Never place it in browser JavaScript, a public repository, a screenshot or a distributable client application.

COMPOSER INSTALLED. MOBILE CONNECTED.

Ship your first PHP messaging workflow.

Start with one controlled recipient, inspect the response and activity, then connect the verified call to your real application event.