API-interfaces for sending SMS-messages
 
 
 
 
Welcome to HTTP XML SMS API documentation

Introduction

 

Global Messaging API connects your website or application with mobile operators worldwide.
XML documents are sent to the specified server address (the description of XML documents, their purpose and the server address are given below).  Used POST method of HTTP/S protocol for sending messages.
The headers of the data that needs to be sent should contain:
Content-type: text / xml; charset = utf-8
Encoding UTF-8 of XML documents.

Send the text message

Parameters:

login value: your username

password value: your password

type: is always equal to “sms”

phone: recipient phone number

client_id_sms: SMS ID on the partner’s side. Optional Parameter. If there is a text message with such           client_id_sms in the system, it will not be sent.

number_sms: The serial number of the subscriber in an XML document. Required Parameter.

Example of sending text message:

Url: http://smpp.global-messaging.ru/xml
<? xml version = "1.0" encoding = "utf-8"?>
<request>
<message type = "sms">
<sender> sender </ sender>
<text> sms text </ text>
<abonent phone = "380631231233" client_id_sms = "3431" number_sms = "1" />
<abonent phone = "380633213211" client_id_sms = "3425" number_sms = "2" />
</ message>
<security>
<login value = "login" />
<password value = "password" />
</ security>
</ request>
 

In response, one of the following xml-documents may be issued:

In case of an error in the XML document that is being sent:
<? xml version = "1.0" encoding = "utf-8"?>
<response>
< error> error </ error>
</ response>
error – the error text message can take the following values:

- the wrong format of an XML document

- your account is locked

- wrong login or password

- post data not available

If the XML document contains no errors:

<? xml version = "1.0" encoding = "utf-8"?>
<response>
<information number_sms = "1" id_sms = "366" id_turn = "1428476741" parts = "1"> send </ information>
<information number_sms = "2" id_sms = "367" id_turn = "1428476741" parts = "1"> send </ information>
</ response>

Parameters description:

number_sms: The serial number of the text message in the source XML document

id_sms: Internal SMS ID that is used for delivery reports. If there was an error in the SMS transmission process, id_sms will be blank.

id_turn: ID of the SMS delivery turn. This parameter is needed for compatibility.

parts: The number of parts the text message is made of.

information: SMS status («send»), if the text message has been sent.

Check the status of SMS text messages

 

Parameters:

login value: Your username

password value: Your password

 

Example:

Url:  http://smpp.global-messaging.ru/xml/stat 
<? xml version = "1.0" encoding = "utf-8"?>
<request>
<get_state>
<id_sms> 202 </ id_sms>
<id_sms> 203 </ id_sms>
<id_sms> 204 </ id_sms>
</ get_state>
<security>
<login value = "login" />
<password value = "password" />
</ security>
</ request>
 

In case of an error in the XML document that is being sent:

<? xml version = "1.0" encoding = "utf-8"?>
<response>
<error> error</error>
</response>
error – the error text can take the following values:

- wrong xml format document

- your account locked

- wrong login or password

- post data not available

If the document contains no errors:
<? xml version = "1.0" encoding = "utf-8"?>
<response>
<state raw_value = "0" id_sms = "202" time = "">partly_deliver</state>
<state raw_value = "0" id_sms = "203" time = "">partly_deliver</state>
</response>
/code>

Parameters description:

raw_value: Message status according to SMPP 3.4 specification

id_sms: Message id

time: Status time. For some values may be empty.

state

Message statuses:

«send» - message status has not been received. In this case this parameter may be blank (time = "").

«not_deliver» - the message was not delivered. The final status (does not change over time).

«expired» - the subscriber was temporarily absent when the operator made attempts to deliver your message to them. The final status (does not change over time).

«deliver» - the message was delivered. The final status (does not change over time).

«partly_deliver» - the message was sent, but the status has not been received. The final status (does not change with time). For more information please contact our technical support.

Check your balance

Parameters:

login value: your username

password value: your password

 

Example:

Url: http://smpp.global-messaging.ru/xml/balance

xml-document:

<? xml version = "1.0" encoding = "utf-8"?>
<request>
<security>
<login value = "username" />
<password value = "password" />
</ security>
</ request>
 

In response one of the following XML documents may be issued:

In case of an error in the XML document that is being sent:

<? xml version = "1.0" encoding = "utf-8"?> <response>
<error> error </ error>
< response>
error - the error text can take the following values:

- wrong xml format document

- wrong login or password

- post data not available

In case the XML document contains no errors:

<? xml version = "1.0" encoding = "utf-8"?>
<response>
<money> 150 </ money>
</ response>

Parameters description:

money: the balance 

Request information via phone number

Parameters:

login value: Your username

password value: Your password

phone: Phone number

Example:

Url: http://smpp.global-messaging.ru/xml/def

xml-document:

<? xml version = "1.0" encoding = "utf-8"?>
<request>
<security> <login value = "username" />
<password value = "password" />
</ security>
<phones>
<phone> 79612242243 </ phone>
<phone> 79612242244 </ phone>
</ phones>
</ request>

In response one of the following XML documents may be issued:

In case of an error in the XML document that is being sent:

<? xml version = "1.0" encoding = "utf-8"?>
<response>
<error> error </ error>
</ response>
error - the error text can take the following values:

- wrong xml format document

- wrong login or password

- post data not available

In case the XML document contains no errors:

<? xml version = "1.0" encoding = "utf-8"?>
<response>
<phone operator = "beeline" country = "ru"> 79612242243 </ phone>
<phone operator = "beeline" country = "ru"> 79612242244 </ phone>
</ response>

Parameters description:

operator: operator

country: two-letter country code.

phone: phone number

Are you ready to start?
Contact one of our telcom experts and get connected today.

Copyright © 2020 Ltd. Global Messaging . All rights reserved. www.glbmessaging.com.