How-To: Sending an outbound SMS from Tropo
March 29th, 2010 by John DyerThe ability to notify your users via SMS is a powerful feature, and one Tropo makes very simple for our developers! To start you need to create a new application, via the ‘Application Manager’ in your Tropo account:

So once you created your new outbound SMS application you then need to get a token, which is a self-service feature! All you need to do is look down once you are in your newly created application. For this tutorial you will want to add an SMS token, but if you are interested in Voice you can read more about that here in our documentation.

So once you have provisioned a token you will see a GUID, which you will want to copy to your clipboard (we’ll need this in a bit).

The next thing you need to do is add an SMS enabled number, otherwise you will not be able to send messages. Doing this requires you just hit the ‘add new number’ button, and then select from our pool of SMS enabled numbers.

So now what? Glad you asked, now it’s time to deploy our code, don’t worry it’s really simple. So we have a great Ruby example in the Call method’s documentation, which we’ll use to send our message. Just go ahead and copy and paste it into your application to give it a test drive:
numberToMessage = $numberToMessage
log "@"*10 + "Sending Message to: " + numberToMessage
call numberToMessage,{ :channel => 'TEXT',
:network => 'SMS'}
say 'Here is your friendly SMS message'
hangup
Then simply take the following URL, substitute your tokenID, and hit enter and watch the SMS magic! As your applications complexity grows you can start to look into other means of launching tokens, such as CURL, but thats another topic entirely =)
http://api.tropo.com/1.0/sessions?action=create&token=yourMessagingToken&numberToMessage=14075551212
Also please be aware that due to carrier restrictions SMS enabled numbers only allow for a maximum of 10 SMS messages per minute 60 SMS messages per minute (1 per second), and as a developer you are responsible for throttling your applications. If you need more then this once you goto production please contact our sales team to discuss other options, such as purchasing a shortcode. HAVE FUN!
Regards,
John Dyer Customer Engineer Voxeo Support
Related posts:

i know that you can send international sms , i tried to send one to China,however the message which is written in Chinese is not displayed properly. all of them became ???????. is there a way around this?
At this time, Tropo’s SMS sending is available in ASCII only. On another note, while we do monitor comments on the blog, support questions will get much faster responses if you use our support forums or email support@tropo.com