Notify Africa
Official SDKs

PHP SDK

Official PHP SDK for Notify Africa SMS API integrations.

PHP

Install

composer require ipfsoftwares/notify-africa-php:dev-main

Source

SMS Methods

MethodSMS endpoint
sendSingleMessage(SingleMessageRequest)POST /api/v1/api/messages/send
sendBatchMessages(BatchMessageRequest)POST /api/v1/api/messages/batch

Example

<?php

use NotifyAfrica\Sms\ClientConfig;
use NotifyAfrica\Sms\NotifyAfricaClient;
use NotifyAfrica\Sms\Request\SingleMessageRequest;

$client = new NotifyAfricaClient(
    new ClientConfig(
        apiToken: getenv('NOTIFY_SMS_API_KEY'),
        baseUri: 'https://api.notify.africa',
    ),
);

$result = $client->sendSingleMessage(
    new SingleMessageRequest(
        phoneNumber: '255712345678',
        message: 'Hello from Notify Africa',
        senderId: 'MYBRAND',
    ),
);

echo $result->getMessageId();

Next Step

Use the SDK in the SMS guide

On this page