This command can be used to send text messages to either individual numbers or entire contact groups.
- Module Module1
- Sub Main()
- Dim sendsmscall As New SendSMSVBDotNet.SendSms
- Dim url As String
- Dim url1 As String
- Dim yourAuthKey As String
- Dim message As String
- Dim senderid As String
- Dim routeid As String
- Dim mobileNo As String
- Dim smsType As String
- Dim scheduleTime As String
- Dim signature As String
- Dim groupName As String
- Dim builder As New StringBuilder
- url = "Sample URL for Post and Get" ' URL = "Sample" 'eg-- www.abc.com
- yourAuthKey = "Sample Auth key" 'eg -- 16 digits alphanumeric
- message = "Sample message to sent" '"Hello this is test"
- senderid = "Sample Sender Id" '"Sample" 'eg -- Testin'
- routeid = "Sampe route Id" 'eg 1
- mobileNo = "Sample Mobile No" 'eg-- '99999999xx,99999998xx
- smsType = "english" 'eg - english or unicode
- scheduleTime = "Sample Schedule time"
- signature = "Sample Signature"
- groupName = "Sample Group Name"
- sendsmscall.sendSmsGet(url, yourAuthKey, message, senderid, routeid, mobileNo, smsType, scheduleTime, signature, groupName)
- Console.ReadLine()
- End Sub
- End Module
- Module Module1
- Sub Main()
- Dim sendsmscall As New SendSMSVBDotNet.SendSms
- Dim url As String
- Dim url1 As String
- Dim yourAuthKey As String
- Dim message As String
- Dim senderid As String
- Dim routeid As String
- Dim mobileNo As String
- Dim smsType As String
- Dim scheduleTime As String
- Dim signature As String
- Dim groupName As String
- Dim builder As New StringBuilder
- url = "Sample URL for Post and Get" ' URL = "Sample" 'eg-- www.abc.com
- yourAuthKey = "Sample Auth key" 'eg -- 16 digits alphanumeric
- message = "Sample message to sent" '"Hello this is test"
- senderid = "Sample Sender Id" '"Sample" 'eg -- Testin'
- routeid = "Sampe route Id" 'eg 1
- mobileNo = "Sample Mobile No" 'eg-- '99999999xx,99999998xx
- smsType = "english" 'eg - english or unicode
- scheduleTime = "Sample Schedule time"
- signature = "Sample Signature"
- groupName = "Sample Group Name"
- sendsmscall.sendSmsPost(url, yourAuthKey, message, senderid, routeid, mobileNo, smsType, scheduleTime, signature, groupName)
- Console.ReadLine()
- End Sub
- End Module
- Module Module1
- Sub Main()
- Dim sendsmscall As New SendSMSVBDotNet.SendSms
- Dim url As String
- Dim url1 As String
- Dim yourAuthKey As String
- Dim message As String
- Dim senderid As String
- Dim routeid As String
- Dim mobileNo As String
- Dim smsType As String
- Dim scheduleTime As String
- Dim signature As String
- Dim groupName As String
- Dim builder As New StringBuilder
- url = "Sample URL for XML" ' URL = "Sample" 'eg-- www.abc.com
- yourAuthKey = "Sample Auth key" 'eg -- 16 digits alphanumeric
- message = "Sample message to sent" '"Hello this is test"
- senderid = "Sample Sender Id" '"Sample" 'eg -- Testin'
- routeid = "Sampe route Id" 'eg 1
- mobileNo = "Sample Mobile No" 'eg-- '99999999xx,99999998xx
- smsType = "english" 'eg - english or unicode
- scheduleTime = "Sample Schedule time"
- signature = "Sample Signature"
- groupName = "Sample Group Name"
- sendsmscall.sendSmsXML(url1, yourAuthKey, message, senderid, routeid, mobileNo, smsType, scheduleTime, signature, groupName)
- Console.ReadLine()
- End Sub
- End Module
Caution: Some users opt to place their request inside a code loop, while testing we highly recommend setting the test parameter to true , as occasionally an infinite loop can occur and users can consume all their credits very quickly.
sender | If you have a promotional account, do not send this parameter. If you have a transactional account, use this field to specify the sender name for your message. Sender name must be 6 alpha characters and should be pre-approved by Textlocal. In the absence of approved sender names, use the default 'TXTLCL' | |||
message | The message content. This parameter should be no longer than 766 characters. See Helpful Information for message length details. The message also must be URL Encoded to support symbols like &. | |||
Login Parameters (Additional Information) | ||||
username | The email address used to log into Textlocal. | |||
hash | Your secure hash can be found within Messenger in the main navigation under "Help->All Documentation". Alternatively you can use the password parameter instead and use your Textlocal password in plain text. | |||
Optional Parameters | ||||
apiKey | This can be used instead of the username/hash/password. You can create them in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address. | |||
numbers | Comma-delimited list of mobile numbers in international format (i.e. 918123456789). | |||
group_id | This parameter can be used in place of the numbers parameter in order to send to an entire contact group. This parameter should contain the ID of the relevant group, which can found either within Messenger (in the "Reports" - "Advanced Reports" - "List of Group ID's" section) or by running the get_groups command. Additionally group 5 contains "contacts" and group 6 contains "opt-outs". | |||
schedule_time | This parameter can be used to specify a schedule date/time for your message, which should be provided in Unix timestamp format. Times should be provided in GMT. | |||
receipt_url | Use this field to specify an alternative URL to which the delivery receipt(s) will be sent. See handling receipts documentation. | |||
custom | This value will be set against the message batch and will passed back in the delivery receipts. This allows you to match delivery receipts to their corresponding messages. | |||
optouts | Can be set to true in order to check against your own opt-outs list and Textlocal's global opt-outs database. Your message will not be sent to numbers within these lists. If not provided defaults to false. | |||
unicode | Set this value to true to specify that your message body will contain unicode characters. See Encoding/Decoding Unicode Documentation | |||
test | Set this field to true to enable test mode, no messages will be sent and your credit balance will be unaffected. If not provided defaults to false |
Error Codes | Description |
3001 * | for Success |
3002 * | Invalid URL |
3003 * | Invalid User/Password |
3004 * | Invalid Message Type |
3005 * | Invalid Message |
3006 * | Invalid Destination |
3007 * | Invalid Source |
3008 * | Invalid DLR Field |
3009 * | Authentication Failed |
3010 * | Internal Error |
3011 * | Insufficient Balance |
3012 * | Responce Time Out |
3013 * | Invalid Request Content Type |
3014 * | Missing Mobile Number |
3015 * | SMs Content for Approval |
3016 * | Missing Required Parameter |
3017 * | FAIL |
3018 * | Expired Account |
3019 * | Null Pointer Exception code |
3020 * | Empty User Name |
3021 * | Empty Password |
3022 * | User Name not Available |
3023 * | Session Expired |
3024 * | Already Exist |
3025 * | Empty Group Name |
3026 * | Empty Contact Name |
3027 * | Empty Mobile Number |
3028 * | Empty Group Id |
3029 * | Empty City Name |
3030 * | Empty Occupation |
3041 * | Empty E-Mail Id |
3042 * | Group not Exist |
3043 * | Empty Message |
3044 * | Empty Route Id |
3045 * | Empty Sender Id |
3047 * | Empty Draft Id |
3048 * | Empty First Name |
3049 * | Empty Last Name |
3050 * | Empty Balance |
3051 * | Empty Role Id |
3052 * | For User Name Length |
3053 * | Empty Expiry Date/td> |
3054 * | Invalid Date |
3055 * | Empty Client Id |
3056 * | Invalid Status |
3057 * | Empty Country Name |
3058 * | Empty State Name |
3059 * | Session Expired |
3060 * | Empty Date |
3061 * | Access Denied |
3062 * | Empty Old Password |
3063 * | Password not Maching |
3064 * | Empty SMS |
3065 * | Empty Amount |
3066 * | Empty Address |
3067 * | Empty RequestId |
3068 * | Empty Group and MobileNo |
3069 * | Empty Description |
3070 * | Fail to Change RoleId |
3071 * | Empty CallerId |
3072 * | Empty File URL and Draft |
3073 * | Empty Duration |
3074 * | Invalid Request |
3075 * | Invalid Aoudio file |
3076 * | Missing Upload File |
Warning Codes | ||||
3 | Invalid number. |