You are here:
Home > Download > Code Samples > XML Examples
|
|
Here some XML examples, intended to be post to TeleMessage's servers.
You may change the code according to the documentation.
|
Simple text message | SMS Message | Multiple recipients | SMS with different sender phone number
Message with attachment |
Schedule message | Message in other language
|
|
| <?xml version="1.0" encoding="UTF-8"?> |
| <TELEMESSAGE> |
| <TELEMESSAGE_CONTENT> |
| <MESSAGE> |
| <MESSAGE_INFORMATION> |
| <SUBJECT>enter your subject here</SUBJECT> |
| </MESSAGE_INFORMATION> |
| <USER_FROM> |
| <CIML> |
| <NAML> |
| <LOGIN_DETAILS> |
| <USER_NAME>enter your user name here</USER_NAME> |
| <PASSWORD>enter your password here</PASSWORD> |
| </LOGIN_DETAILS> |
| </NAML> |
| </CIML> |
| </USER_FROM> |
| <MESSAGE_CONTENT> |
| <TEXT_MESSAGE> |
| <MESSAGE_INDEX>0</MESSAGE_INDEX> |
| <TEXT>enter your text here</TEXT> |
| </TEXT_MESSAGE> |
| </MESSAGE_CONTENT> |
| <USER_TO> |
| <CIML> |
| <DEVICE_INFORMATION> |
| <DEVICE_TYPE DEVICE_TYPE="MobileNumber"/> |
| <DEVICE_VALUE>16173190666</DEVICE_VALUE> |
| </DEVICE_INFORMATION> |
| </CIML> |
| </USER_TO> |
| </MESSAGE> |
| </TELEMESSAGE_CONTENT> |
| <VERSION>1.5</VERSION> |
</TELEMESSAGE>
|
|
XML Explanation |
- <USER_TO>...
<DEVICE_TYPE DEVICE_TYPE="MobileNumber">
DEVICE_TYPE indicates the device type for sending a message to.
There are several pre-defined attribute values, as follows:
"HomeNumber", "BusinessNumber", "BusinessFax",
"MobileNumber", "SMS", "EmailAddress".
- <USER_TO>...
<DEVICE_VALUE>16173190666 </DEVICE_VALUE>
Here you can set the recipient device value.
|
|