vivekdhumal/gupshup-sms-php

Package to send SMS using Gupshup REST API

v1.1 2024-12-01 15:02 UTC

This package is auto-updated.

Last update: 2024-12-01 15:10:26 UTC


README

This package will manages to send Text SMS using Gupshup.io service

Version - v1.1

Requirement

  • PHP VERSION >= 7.3
  • Gupshup.io Account

Install Using Composer

composer require vivekdhumal/gupshup-sms-php

Implementation

<?php

require_once 'vendor/autoload.php';

use VivekDhumal\GupshupSMS\GupshupMessage;

$userid = 'Your user id';
$password = 'Your password';
$mask = 'Your Company Sender ID / Mask';
$entityId = 'Your company Entity ID if required'; // optional
$templateId = 'Your registered SMS Template ID if required'; // optional

$sms = new GupshupMessage($userid, $password, $mask, $entityId, $templateId);

$response = $sms->to('+91XXXXXXXXXX')
            ->message('Your message')
            ->send();

var_dump($response->status, $response->message, $response->details, 
$response->id, $response->phone);