Your Developer friendly API for all things Bulk SMS, Voice, IoT, OTP

With your Hellio Messaging account you have instant access to our API, this enables you to easily integrate our SMS and MMS services with your website, software or CRM application in PHP, ASP, .NET, Java or any other language.

Required Parameters

Every API request supports the following parameters.

Name Description
clientId Your client ID (ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE)
authKey The hashed auth. key: Concatenate the client Id, the application secret and the current time in the format yyyymmddHH and hash the concatenated string using SHA1
senderId The sender ID of the message
msisdn The MSISDN (phone number)
message The text message

Response Codes

Responses are, by default, sent in JSON format. However, this can be changed to XML with the format parameter. Every response will contain a "status" field, which can be either "success" or "failure". This field can be used to determine whether your request was successful.

  • Message: Sucess! This means your SMS has sucessfully been delievered
  • Message: When you have improved a feature or updated a plugin to new version
  • Message: Your credential is invalid!
  • Message: Client Id is required, but you have not provided it
  • Message: When two or several files/features have merged together
  • Message: When a file or peace of code moved to another place

PHP Code Sample

If you need more clean and easy making changelog component, you can use changelog lists.


//Set Time Zone as this is very important to ensure your messages are delievered on time
date_default_timezone_set('Africa/Accra');

// Account details
$clientId = 'ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE';
$applicationSecret = 'ENTER-YOUR-32-DIGITS-CODE-HERE';

// Prepare data for POST request
$url = 'https://app.helliomessaging.com/api/v2/sms';
$currentTime = date('YmdH');
$hashedAuthKey = sha1($clientId . $applicationSecret . $currentTime);
$senderId = 'TEST'; //Change this to your sender ID e.g. HellioSMS
$msisdn = '233265515154'; //Change this to the recipient you wish to send the message to
$message = 'Hello PHP!'; //The message to be send here
$params = [
  'clientId' => $clientId,
  'authKey' => $hashedAuthKey,
  'senderId' => $senderId,
  'msisdn' => $msisdn,
  'message' => $message
];

// Send the POST request with cURL
$ch = curl_init($url);
$payload = json_encode($params);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($payload)
));

// Process your response here
$result = curl_exec($ch);
echo var_export($result, true);
curl_close($ch);

                

// Account details
$clientId = 'ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE';
$applicationSecret = 'ENTER-YOUR-32-DIGITS-CODE-HERE';

// Prepare data for POST request
$url = 'https://app.helliomessaging.com/api/v2/sms';
$currentTime = date('YmdH');
$hashedAuthKey = sha1($clientId . $applicationSecret . $currentTime);
$msisdn = '233265515154'; //Change this to the recipient you wish to send the message to
$params = [
  'clientId' => $clientId,
  'authKey' => $hashedAuthKey,
  'msisdn' => $msisdn,
];

// Send the POST request with cURL
$ch = curl_init($url);
$payload = json_encode($params);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($payload)
));

// Process your response here
$result = curl_exec($ch);
echo var_export($result, true);
curl_close($ch);

                

Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it?

Python Code Sample

If you need more clean and easy making changelog component, you can use changelog lists.



#!/usr/bin/env python

import urllib.request
import urllib.parse

def Helliosms(clientId, authKey, msisdn, senderId, message):
 data = urllib.parse.urlencode({'clientId': apikey, 'authKey': msisdn,
 'message' : message, 'senderId': senderId})
    data = data.encode('utf-8')
 request = urllib.request.Request("https://app.helliomessaging.com/api/v2/sms")
    f = urllib.request.urlopen(request, data)
    fr = f.read()
    return(fr)

resp =  Helliosms('apikey', '233265515154',
    'HellioSMS', 'This is your message')
print (resp)

                

No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.

Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it?

C# Code Sample

If you need more clean and easy making changelog component, you can use changelog lists.



using System;
using System.Collections.Generic;
using System.Net;
using System.Collections.Specialized;

namespace Helliosms
{
    class Helliosms
    {
        public string Helliosms()
        {
            String message = HttpUtility.UrlEncode("This is your message");
            using (var wb = new WebClient())
            {
                byte[] response = wb.UploadValues("https://app.helliomessaging.com/api/v2/sm", new NameValueCollection()
                {
                {"clientId" , "ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE"},
                {"authKey" , "ENTER-YOUR-32-DIGITS-CODE-HERE"},
                {"msisdn" , "233265515154"},
                {"message" , message},
                {"senderId" , "Eddy's Pizza"}
                });
                string result = System.Text.Encoding.UTF8.GetString(response);
                return result;
            }
        }
    }
}
                

No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.

Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it?

Java Code Sample

Please consider that this layout has a bit different html structure that other layouts.



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;

public class Helliosms {
	public String Helliosms() {
		try {
			// Construct data
			String clientId = "clientId=" + "ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE";
			String authKey = "&authKey=" + "ENTER-YOUR-32-DIGITS-CODE-HERE";
			String message = "&message=" + "This is your message";
			String senderId = "&senderId=" + "Eddy's Pizza";
			String msisdn = "&msisdn=" + "233265515154";

			// Send data
			HttpURLConnection conn = (HttpURLConnection) new URL("https://app.helliomessaging.com/api/v2/sms?").openConnection();
			String data = clientId + authKey + msisdn + message + sender;
			conn.setDoOutput(true);
			conn.setRequestMethod("POST");
			conn.setRequestProperty("Content-Length", Integer.toString(data.length()));
			conn.getOutputStream().write(data.getBytes("UTF-8"));
			final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
			final StringBuffer stringBuffer = new StringBuffer();
			String line;
			while ((line = rd.readLine()) != null) {
				stringBuffer.append(line);
			}
			rd.close();

			return stringBuffer.toString();
		} catch (Exception e) {
			System.out.println("Error SMS "+e);
			return "Error "+e;
		}
	}
}
                

Perl Code Sample

Please consider that this layout has a bit different html structure that other layouts.



#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTTP::Request::Common;

my $clientId = 'ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE';
my $authKey = 'ENTER-YOUR-32-DIGITS-CODE-HERE';
my $senderId = "Eddy's Pizza";
my $msisdn = "233265515154";
my $message = "This is your message";
my $ua = LWP::UserAgent->new();

my $res = $ua->request
(
 POST 'https://app.helliomessaging.com/api/v2/sms?',
 Content_Type  => 'application/x-www-form-urlencoded',
 Content       => [
			'clientId'      => $clientId,
			'authKey'       => $authKey,
			'msisdn'        => $msisdn,
			'message'       => $message,
			'senderId'      => $senderId
                  ]
);

if ($res->is_error) { die "HTTP Errorn"; }
print "Response:nn" . $res->content . "nn";
                

Ruby Code Sample

Please consider that this layout has a bit different html structure that other layouts.



require "rubygems"
require "net/https"
require "uri"
require "json"

requested_url = 'https://app.helliomessaging.com/api/v2/sms?'

uri = URI.parse(requested_url)
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

res = Net::HTTP.post_form(uri, 'clientId' => 'ENTER-YOUR-13-DIGITS-ALPHANUMERIC-CODE-HERE', 'authKey' => 'ENTER-YOUR-32-DIGITS-CODE-HERE',
'message' => 'This is your message', 'senderId' => 'Ben', 'msisdn' => '233265515154')
response = JSON.parse(res.body)
puts (response)