Esendex Logo
MENU
Log in to my account
Log in to my account
  • API Reference
  • Quickstart Guides
  • SDKs
Track SMS

Track SMS

This guide shows how to retrieve the current status of an individual message using the REST API.

Track SMS code

loading animation
C#|PHP|Java|Node|Go
var loginCredentials = new EsendexCredentials("YourUsername", "YourApiPassword");
var sentMessageService = new com.esendex.sdk.sent.SentService(credentials);
var message = test.GetMessage(new Guid('esendexmessageid'));
Console.WriteLine(message.Status);
$authentication = new \Esendex\Authentication\LoginAuthentication(
    "EX000000", // Your Esendex Account Reference
    "user@example.com", // Your login email address
    "api-password" // Your API password
);
$headerService = new \Esendex\MessageHeaderService($authentication);
$message = $headerService->message("messageId");
print_r($message->status());
UserPassword userPassword = new UserPassword("YourUsername","YourApiPassword");
BasicServiceFactory serviceFactory = ServiceFactory.createBasicAuthenticatingFactory(userPassword);
SentService sentService = serviceFactory.getSentService();

try{
    response = sentService.getMessage("3b8314b8-1a28-4e88-8b5c-175b11037dd2");
}catch(Exception e){
    e.getStackTrace();
}
var config = require('./config'),
    esendex = require('../')(config); 

esendex.messages.get({ id: messageheader.id }, function (err, message) {
      if (err) return console.log(err);
client := New("user@example.com", "api-password")

response, err := client.Message("45e1bc74-2e0f-4141-bda5-bb7fdbb4feff")
if err != nil {
    log.Fatal(err)
}

fmt.Printf("%v %s: %s\n", response.SubmittedAt, response.To, response.Summary)

These examples require the SDKs

You will need:

  • Your Esendex account reference (EX0xxxxxx), username and API password.
    • Don't have an account yet? You'll need to create an account.
    • Need an API password? You can generate one on your user profile.
  • The ID of the message you wish to track.

What you might want to do with the response

  • Save the response against the action that triggered your system to send a message.

What else you might want to do

  • Check the status of all the messages in the batch you sent.

What you might want to do next

  • Repeat this call again later if the message hasn’t been delivered.
  • Check for a reply to your message.
Esendex UK & Ireland
support@esendex.com 0345 356 5758

20 Wollaton Street
Nottingham
NG1 5FW

Esendex Europe
ventas@esendex.es 900 800 470

Av. Diagonal, 534
08006 Barcelona
Spain

Esendex Australia & USA
support@esendex.com.au 1300 764 946

Level 10, 60 Albert Road
South Melbourne
VIC 3205

Support
View Status Support Terms of use Privacy Cookie policy Blog LinkedIn

Commify UK Ltd 2023 | Registered company number: 04217280

21.09.07.b-54.css-1391
UK