SMS API

You use the SMS API to send and receive a high volume of SMS anywhere in the world.

The workflow for sending outbound messages using the SMS API is:

  • Create a request to send an SMS.
  • Check the response codes and ensure that you sent the request correctly.
  • Your message is delivered to the handset. The user's handset returns a delivery receipt.
  • If you set callback in the request, check that your user received your SMS correctly.

<?php
$url = 'https://rest.txtuno.com/sms/json?' . http_build_query(
    [
      'api_key' =>  'API_KEY',
      'api_secret' => 'API_SECRET',
      'to' => '441632960960',
      'from' => '441632960061',
      'text' => 'Hello from txtUno'
    ]
);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

echo $response;

Sample API

 Get http://api.txtuno.com/api/balance.php?authkey=YourAuthKey&type=1
Error Responses: returns text SMS balance detail if all parameters are correct or appropriate error message
Parameter Name Value Description
authkey * alphanumeric Login authentication key (this key is unique for every user)
type * string Route name, For ex. 1,4 or default, template