NEW Feature: Send SMS from your site or software with our SMS API!

NEW Feature: Send SMS from your site or software with our SMS API!

May 14, 2015
|
Comments off
|

At Message Hero HQ, we are constantly working hard to create NEW cutting-edge functionality to enable you to contact your customers easily by SMS. Check out our latest new features below!!

Tweet @messagehero if you have any questions!!


Message Hero’s SMS API

We know that while SMS marketing is a low-cost way to reach all your customers, you may want to reach them in other ways, for instance when they make a purchase or booking on your website. Enter Message Hero’s new SMS API – a powerful, yet simple way for your business, with the help of your developers, to integrate SMS sending into your website, app or software. Just like Message Hero it’s free to use the API, there are no monthly fees or charges, just a simple cost per SMS.

You can connect to the Message Hero API and send SMS by completing three simple steps:

Step 1 – SIGNUP

The first step is to signup for a free Message Hero account and get it set up so you can use the API. If you already use Message Hero, then this part is done! Then, if you’d like to use a custom ‘from’ label, you just need to enter one on the Compose view. And lastly, if you don’t have credit, you’ll need to top up so that you have credit to send your SMS.

Step 2 – AUTHENTICATE

Next, you’ll need to call our API with your Message Hero account details to receive an authentication token as in this sample:

jQuery example:
 
var token = '';       
var email = 'mhemail@domain.com';
var password = 'mhpassword';

$.ajax({
	url: 'https://www.messagehero.com/api/token',
	type: 'post',
	data: {
		email: email,
		password: password,
		grant_type: 'password'
	},
	success: function (response) {
		if (response.access_token != undefined) {
			token = response.access_token;
		}
		else
		{
			alert(response.responseMessage);
		}
	},
	error: function($xhr) {
		alert($.parseJSON($xhr.responseText)
			.ResponseMessage);
	}
});

Step 3 – SEND

Lastly you can call our API via POST or GET methods to send an SMS (POST sample below). You can use a custom ‘from’ label and you’ll receive a response code from our API so you know the status of your SMS.

jQuery example:
var message = JSON.stringify({ msisdn: '35386XXXXXXX', userFromTag: 'Business', messageText: 'Your Message Text' }); $.ajax({ url: 'https://www.messagehero.com/api/message/send', type: 'post', contentType: 'application/json', dataType: 'json', headers: { Authorization: 'bearer ' + token }, data: message, success: function (response) { alert(response.responseMessage); alert(response.responseCodeId); }, error: function($xhr) { alert($.parseJSON($xhr.responseText) .ResponseMessage); alert($.parseJSON($xhr.responseText) .ResponseCodeId); } });

For complete information on our new SMS API, please click here.


Google Chrome App

We are always looking at ways to make Message Hero more user friendly, so we’ve created a Google Chrome App that can add Message Hero to your Google Chrome web browser for free. Customers can use Message Hero’s Chrome App as a shortcut to enter their account or go to the Message Hero’s website.

Click here to get Message Hero’s Google Chrome App


Feedback

We are constantly developing new features for Message Hero, based on feedback from our users, so we can make the whole process of sending and receiving SMS as seamless and easy as possible.

If you have any features you would like to see integrated into Message Hero in the future, please get in touch and let us know.