Skip to content
Yii Framework Library to interact with Nexmo Mobile Message Provider's Restful API
Latest commit fdc9f05 May 25, 2014 @tonydspaniard Update README.rst
Failed to load latest commit information.
ENexmoAccount.php Initial commit Mar 21, 2012
ENexmoBase.php Initial commit Mar 21, 2012
ENexmoReceipt.php Initial commit Mar 21, 2012


ENexmo Library 1.0.1 Manual

IMPORTANT: This library is not longer maintained. Its API has been deprecated.

ENexmo Library allows Yii programmers to use the Restful API offered by Mobile Messaging provider Nexmo.

Nexmo is a cloud-based SMS API that lets you send and receive high volume of messages at wholesale rates.


Quick Start

Once you have created your Nexmo account and include ENexmo library and EHttpClient on the extension folder is as easy as this:

/* import extensions before any call */

/* to send a message */
$nexmo_sms = new ENexmoSms('YOURAPIKEY','YOURAPISECRET');

$response = $nexmo_sms->sendTextMessage('RECIPIENTSNUMBER','SENDERID','Howdy testing! Please, search on');

/* responses are on JSON or XML. Defaults to JSON, but you can change that */
/* we use CHtml::encode for demo purposes only, to check for responses */
echo CHtml::encode($response);

/* to make requests for account */
$nexmo_account = new ENexmoAccount('key','secret');
$nexmo_account->format = ENexmoBase::FORMAT_JSON;

/* to search for a message */
echo CHtml::encode($nexmo_account->searchMessage('09AFDA98'));
//echo CHtml::encode($nexmo_account->searchMessagesByIds(array('09AFCC5B','09AFDA98')));
//echo CHtml::encode($nexmo_account->searchMessagesByDateAndRecipient('2012-03-20','34607040932'));
//echo CHtml::encode($nexmo_account->balance);
//echo CHtml::encode($nexmo_account->ownNumbers);
//echo CHtml::encode($nexmo_account->getSmsPricing('ES'));

Please check Nexmo API Documentation Nexmo API Documentation

Something went wrong with that request. Please try again.