Admin

Two-Way Text Plus

Sending a Text Message to a Recipient

Overview
When sending a text message to a Recipient, your HTTP endpoint sends the data via a GET method to the NGGT service endpoint. The GET method sends information via the HTTP URL as name=value pairs in the query string of the HTTP request.
GET Request
With the programming language of your choice, you send request.

    {NggtServiceEndpoint}/send.mms.php?auth={AuthorizationCode}&stid={StationId}&body={Text+Message+to+Recipient}&tn={RecipientPhoneNumber}&files={ClientMediaUrl}\img01.png,{ClientMediaUrl}\img02.jpeg
Query String Parameters (complete list upon Registration)
Parameter Name Description
Authorization Code

auth

Unique access key for your HTTP endpoint (URL)
Recipient Phone Number

tn

Country Code + 10 digits (e.g. +14071234567)
Station Id

stid

Unique identifier for your HTTP endpoint (URL)
Text

body

Message to Recipient (maximum 140 characters, encoded)
File Location

files

The location of the media file on your server
Notes
  • body parameter or files parameter is required
  • files: multiple files are comma separated (no spaces)
  • files: maximum 1MB per file, 5MB total
  • Please Register for access to the complete Two-Way Text Plus API Documentation
  • The NGGT Two-Way Text Plus service sends and receives 8-bit Unicode (UTF-8) characters, including letters with diacritical marks (accents)

Receiving a Text Message from a Recipient

Overview
When a Recipient sends a text/media message, your HTTP Endpoint receives the data via a POST method from the NGGT service. The POST method sends information via the HTTP header as name/value pairs sent within the body of the HTTP request.
Accessing POST Values
With the programming language of your choice, you access the POST values. For example, in PHP:

    $RecipientPhoneNumber = $_POST['from'];
Response Parameters (complete list upon Registration)
Parameter Name Description
Authorization Code

auth

Unique access key for your HTTP endpoint (URL)
Recipient Phone Number

from

Country Code + 10 digits (e.g. +14071234567)
Station Id

stid

Unique identifier for your Http Endpoint (URL)
Text

body

Message from Recipient (maximum 140 characters, encoded)
Content type of media

MediaContentType0

e.g. image/jpeg
Location of media

MediaUrl0

e.g. {NggtMediaUrl}/MediaFilename1
Content type of media

MediaContentType1

e.g. image/png
Location of media

MediaUrl1

e.g. {NggtMediaUrl}/MediaFilename2
Number of media

NumMedia

e.g. 2
Notes
  • All parameters are required except files
  • MediaContentType0 & MediaUrl0 refer to the same media file
  • MediaContentType1 & MediaUrl1 refer to the same media files
  • Please Register for access to the complete Two-Way Text Plus API Documentation
  • The NGGT Two-Way Text Plus service sends and receives 8-bit Unicode (UTF-8) characters, including letters with diacritical marks (accents)