Garret Heaton

How HipChat works: SMS chat with Twilio

By Garret Heaton | 4 years ago | 10 Comments

Earlier this week we released a mobile alerts feature allowing users to hook up their cell phones and participate in one-on-one chats while away from the computer. Having SMS support is important to us because just about everyone has a cell phone but not necessarily a smart phone capable of running our web chat. Adding SMS support turned out to be quite simple thanks to Twilio. Here’s why:

1. Cost – At first we thought we’d have to use short codes to send our messages. They’re the 5 or 6 digit numbers you can text vote on American Idol, get crappy ringtones, etc. Unfortunately they’re about $500/mo each (and some companies will charge you much more). We also looked at using a shared short code but you can’t do two-way SMS (send and receive) with them. Twilio lets you use local numbers for $1/mo that can send up to 1 message per second. This means we can just add more numbers as our volume increases. Finally, each message (in or out) is just $0.03.

2. Setup speed – It takes about 90 days and a bunch of approvals to get a short code, probably because you can use them to charge people monthly fees. Allocating a local number on Twilio takes about 15 seconds (even less if you do it through their API).

3. Two-way messaging – We need to be told about replies to the messages we send so mobile users can actually have conversations. We also need to use a different phone number for each chat session you have so that we know who you’re replying to (that’s where the short codes get really expensive). Twilio will hit a URL we provide with information about each incoming SMS so we can deliver them to the right person.

Note: If you’re just doing low-volume one-way messaging you can probably get away with email-to-SMS gateways.

4. Clean API – Twilio’s REST API is easy to use, and has a PHP library available. We just wish they had JSON support. By the way, we’re getting really close to releasing our own API!

5. Good support – They were far more helpful and responsive than other SMS gateway providers. We had the feature built and working in about 2 days.

We hope everyone enjoys the new SMS chat feature and that some of you will have the pleasure of adding SMS (or voice) support to your own app.

HipChat is group chat and IM built for teams. Learn more
  • Pingback: Tweets that mention How HipChat works: SMS chat with Twilio -- Topsy.com

  • http://monitorius.com gothy

    Does it work internationally?
    Found some comments about non-functioning Twilio outside the US, anything changed?

  • http://powdahound.com Garret Heaton

    Twilio claims to work with international numbers (http://www.twilio.com/faq/international) but we haven't hooked up support for them in our UI yet. It's hard to test without an international number. :) Would you like me to try adding support for your country?

  • http://john-sheehan.com/blog John Sheehan

    Hi Garret,
    John from Twilio here. Great post! Good comparison of the options that are out there. Just wanted to point out one thing about JSON. Twilio supports JSON as a return type. You can find more info on our Tips & Tricks page: http://www.twilio.com/docs/api/2008-08-01/rest/

    Was there another place you wanted JSON support?

  • http://powdahound.com Garret Heaton

    John: Thanks, that's perfect. I hadn't come across that page before. We're just using your PHP library for most stuff anyway so didn't have to deal with too much XML. :)

  • http://powdahound.com Garret Heaton

    Twilio claims to work with international numbers (http://www.twilio.com/faq/international) but we haven't hooked up support for them in our UI yet. It's hard to test without an international number. :) Would you like me to try adding support for your country?

  • Lbarahona

    I’m trying to implement SMS functionality in a test application i’ve created but it seems that twilio doesn’t support international sms, when i try to send a message to my mobile in Honduras(country code 504) phone: 95740407 i got an error in my log account.

    i have been trying to use the following structures:
    01150495740407
    +01150495740407
    50495740407
    150495740407

    but nothing works.
    Do you have any advice in case i’m using a wrong structure in the number?

  • http://powdahound.com Garret Heaton

    Honduras is in Twilio’s list of supported countries but it’s not guaranteed to work. See: http://www.twilio.com/sms/international

    You should contact their support team for an official answer: http://www.twilio.com/help

  • Sumeer_ahmad

    shahid

  • Muhammad Azeem

    “Eocean is a leading Mobile Value added Services company that provides comptetitive edge to enterprises by blending the power of mobile communication technology with mobile/web applications.” http://www.eocean.pk/