Developer References
We've created a set of client libraries for our REST API to enable simple and effective integration of our API into your code in minutes.
This page has been prepared to give developers a quick overview and demonstration on how you can send your very first SMS.
Sign up for a free SMSGlobal account today and get your API Key from our advanced SMS platform, MXT. Plus, enjoy unlimited free developer sandbox testing to try out your API in full!
The following guide will demonstrate how you can use SMSGlobal’s SDK to send your first message:
There are three required parameters when sending a message:
var payload = {
origin: 'from number',
destination: 'destination',
message: 'This is a test message'
}
smsglobal.sms.send(payload, function (error, response) {
console.log(response);
});<?php
require_once __DIR__ . '/vendor/autoload.php';
// get your REST API keys from MXT https://mxt.smsglobal.com/integrations
\SMSGlobal\Credentials::set('YOUR_API_KEY', 'YOUR_SECRET_KEY');
$sms = new \SMSGlobal\Resource\Sms();
try {
$response = $sms->sendToOne('DESTINATION_NUMBER', 'This is a test message.');
print_r($response['messages']);
} catch (\Exception $e) {
echo $e->getMessage();
}var client = new Client(new Credentials("SMSGLOBAL-API-KEY", "SMSGLOBAL-SECRET-KEY"));
var response = await client.SMS.SMSSend(new {
origin = "Test",
destination = "DESTINATION-NUMBER",
message = "This is a test message"
});Refer to our REST API documentation for additional parameters to incorporate other functionality like scheduling your message or sending to multiple destinations at once.
REST API credentials can be provided in the SMSGlobal client or node environment variables. The credential variables are SMSGLOBAL_API_KEY and SMSGLOBAL_API_SECRET
npm install --save smsglobalconst apiKey = 'YOUR_API_KEY';
const apiSecret = 'YOUR_API_SECRET';
var smsglobal = require('smsglobal')(apiKey, secret);All method return promise if no callback is given.
Refer to our SDK on GitHub here for additional information.
To install the PHP client library to your project, we recommend using Composer.
composer require smsglobal/smsglobal-phpRefer to our SDK on GitHub here for additional information.
This library supports .NET applications written in C#, VB.Net, and F# that utilise .NET Standard 2.1 which supports .NET Core 3.0 and unavailable for .NET Framework. View the supported versions here.
The best and easiest way to add the SMSGlobal libraries to your .NET project is to use the NuGet package manager.
From within Visual Studio, you can use the NuGet GUI to search for and install the SMSGlobal NuGet package. Or, as a shortcut, simply type the following command into the Package Manager Console:
Install-Package SMSGlobalIf you are building with the .NET Core command line tools, then you can run the following command from within your project directory:
dotnet add package SMSGlobalFrom within Visual Studio while creating azure function app, you can use the NuGet GUI to search for and install the SMSGlobal NuGet package. Or, as a shortcut, simply type the following command into the Package Manager Console:
Install-Package SMSGlobalMore information on NuGet Client Tools can be found here.
Once installed, head over to readme for additional configuration instructions.
Live demonstations of our MXT platform are conducted over Google Meets by our friendly tech support team and generally take 15mins.