Knowledge Base » SMS Gateway » HTTP Interface
Contents
- How do I send an SMS message? [8]
- How do I send a message with non-GSM 03.38 characters? [9]
- How do I submit messages directly in GSM03.38 (GSM character set)? [10]
- How do I receive delivery reports via HTTP? [20]
- How do I process received messages? [24]
How do I send an SMS message? [8]
In order to send the message "Test €" from 12345 to 07712345678, your request should be as follows:
http://sms.mxtelecom.com/SMSSend?user=username&pass=password&smsfrom=12345&
smsto=447712345678&smsmsg=Test+%A4&report=7
More information concerning the submission of messages to the SMS Gateway via. HTTP can be found here.
Please note that the smsmsg parameter should be urlencoded from the ISO 8859-15 (Latin 9) character set. If you submit a character that is not in the GSM 03.38 character set, the SMS gateway will make a best guess as to which character will be displayed instead. For example the character 'Â', which is not in GSM 03.38 will be displayed as 'A'.
How do I send a message with non-GSM 03.38 characters? [9]
If you cannot use the GSM 03.38 character set to send messages, you must submit messages in hexencoded Unicode UCS-2, as specified here.
So to send the message "Здравствуйте" to a Russian handset (for example 70923634578), the request string should read:
http://sms.mxtelecom.com/SMSSend?user=username&pass=password&smsto=70923634578&
smsfrom=12345&report=7&smsucs2=0417043404400430043204410442043204430439044204350021
How do I submit messages directly in GSM03.38 (GSM character set)? [10]
In order to submit GSM03.38 characters, please use the smsia5 parameter, with %-encoded GSM characters (one octet per character).
For example, to send the message "ABΓΔ" to 447712345678, the request string would be as follows:
http://sms.mxtelecom.com/SMSSend?user=username&pass=password&smsto=447712345678&smsfrom=12345&
report=7&smsia5=AB%13%10
Please look here for more details.
How do I receive delivery reports via HTTP? [20]
Please see here for more information. Once you are able to process delivery reports, please email the URL of your application to support@mxtelecom.com, and we can then push reports to your application directly.
How do I process received messages? [24]
Please look here for information on receiving SMS messages. In almost all sensible cases, you will receive single or concatenated messages in GSM 03.38 or UCS-2.
When receiving concatenated messages, the message will have a UDH (User Data Header) given in hexcode by the smsudh parameter in our GET request to your server eg ...&smsudh=0500031C0302&...
The UDH for concatenated messages can be interpreted as follows as follows:
- 05 There are 5 bytes to follow
- 00 Indicator for concatenated message
- 03 There are 3 bytes to follow
- 1C Message Identifier †
- 03 This is a three part message
- 02 Of which this is the second part
If the message was in GSM03.38, you will receive the message via the smsmsg parameter in urlencoded Modified Latin-9, and will have the parameter bits=7.
If the message was in UCS-2, you will receive the message via the smsucs2 parameter in hexcode with the parameter bits=16. You will also have the smsmsg parameter in this case, with a "best guess" interpretation of the UCS-2 message.