Messente avatar logo

Quick API tutorial

- 5 MIN READ - 27 Nov 2012

Integrating Messente SMS sending API to your current framework is very easy. Here is a small tutorial to get you started with Messente API.

1. Sign up to Messente

First need to sign up to https://messente.com/ and apply for a sender name.

Signing up and requesting a sender name will take no more than 3 minutes.

2. Activate SMS sending API

To activate your API you need an active sender name and IP address of your server.

Quick way to find out the correct IP address, is to make a temporary file myip.php with following content:

<?php
$ip_address = file_get_contents('http://automation.whatismyip.com/n09230945.asp');
echo $ip_address;
?>

Always make sure you get the correct IP address. One symptom of invalid IP address is “ERROR 103″ response.

Now you have all the required data to activate your API for sending out SMS.


* note, that the “DLR Response URL” field is not required

After activating the API you will be shown the username and password of your API account.

3. Very simple SMS sending script

Download PHP development library for Messente API:
https://raw.github.com/jbaanus/Messente-API/master/php/messente.php

Let’s make a very simple test with no delivery reports or error validation to see if our account is set up correctly.

Always implement error validation to avoid any suprises, e.g. when your server IP address changes.

Create a file called simple_sms.php:

<?php

// API library from https://raw.github.com/jbaanus/Messente-API/master/php/messente.php
require_once('messente.php');

// Username and password acquired from step 2
$Messente = new Messente(array(
    'username' => 'xxxxxxxxxxxxx',
    'password' => 'yyyyyyyyyyyyy',
    'debug' => true,
    'error_email' => 'dev_null@messente.com'
));

// Fill in receiver and content of the test-message
$result = $Messente->send_sms(array(
    'to' => '+444444444444',
    'content' => 'This is my test message sent '.gmdate('d.m.Y H:i:s').' UTC'
));

echo "<p>Result from sending SMS:</p>";
var_dump($result);

?>

If the SMS sending failed, you can check Messente API documentation for error codes.

Jaanus Rõõmus

Jaanus Rõõmus - CTO

Jaanus is co-founder and CTO of Messente and makes sure its wheels keep spinning and Messente always has a full tank of fuel.

Startup Conferences: What’s the point? (Slush 2017)

20 Oct 2017

With Slush coming up in about a month, it’s a good time ponder the purpose of large startup conferences. Many entrepreneurs head to conferences, like Slush, around the world and throughout the year looking for investments from venture capitalists and angel investors, yet there’s a lot more to gain from startup conferences. Think about it: there will be over 17,000 motivated and creative people in one place at one time. Get creative and gain as much as you can out of the experience.

Yuriy Mikitchenko

Yuriy Mikitchenko

The economics behind undelivered, failed SMS messages    

17 Oct 2017

The cost and full impact of undelivered or failed messages isn’t immediately clear. The financial impact is not simply the combination of the failed SMS and the cost to resend the message, which isn’t very much at times. There are other indirect costs that result from undelivered SMS messages that matter from a financial perspective. Let’s take a deeper look into the ripple effect of undelivered messages, which make the reasons behind our focus on SMS delivery quality even more clear.

Here are a few examples.

Uku Tomikas

Uku Tomikas

Fraud and Security: 2FA Considerations for PSD2

10 Oct 2017

The second Payment Services Directive (PSD2) is less than three months away from enforcement. While the regulation’s text is lengthy, a key component of the law is its extended reach in comparison to the first directive. PSD2 applies to all payment service providers and affiliates, including account information service providers and payment initiation service providers. In addition, the law applies when at least one part of the transaction is in the European Union. This means that payment service providers and their affiliates outside of the EU must comply with the law when the payer is in the EU. The additional geographical reach guarantees the same level of security expectations for all EU residents regardless of the location of the payment service provider.

Raili Liiva

Raili Liiva

Start sending messages to

for € N/A

Contact us