Hacking My Apartment Door with Twilio

When I get visitors at my apartment, they can’t get in at the front door to the building. When I first did this, I didn’t have a local Portland phone number, and for some odd reason, my Google voice number didn’t work. So I turned to twilio, to help with my laziness of not waiting to go down stairs and let people in.

My goal

Have the apartment call box dial a number, press 9, and automagically let them in. 🙂

Safe and secure? Not at all! If anyone found about this, they could call “me” and anyone could come right in. However, I live in a huge building with lots of randos coming in an out, so I don’t really care.

Here’s how I did it:

  • First I created a trial account at https://www.twilio.com and create a new TwiML App. A TwiML app is a quick one-off app, where your twilio number run some code when someone calls or texts your number.
  • I named my app “dial 9”.
  • Then I went to http://twimlets.com to help me create my “dial 9” app. Twimlets.com, is a twilio labs site for creating twiml apps. Pretty helpful and straight forward.
  • Next I went to the messages page, to configure what happens when the call box calls my number: https://www.twilio.com/labs/twimlets/message

As the instructions state, simply write out what you want your app to say when it answers the phone:


Dialing 9

For my app, I first wanted an mp3 to play. Which emulate pressing the 9 button on a touch tone phone.

I found an mp3 of this at this location:



In the first message box, I simply pointed to my mp3 for message 0, and added a friendly message for message 1. Feel free to add all the message you want.

After that, I just copied and pasted the the resulting URL into my dial 9 voice Request URL.


Voilà! Now have a phone number that answers, dials 9, and welcomes anyone in. Just simply dial the number on your phone and make sure everything is working.

Finally have your apartment management change the number at the gate / door and welcome random strangers in.

Important notes:

If your using a trail account, you get a message reminding you that you’re using a trail account every time you call your Twilio number. That’s kind of annoying and distracting, so I gave in and bought a number. After a couple of months in use, it’s only cost me around ~$1.30. Worth the laziness. 🙂

One Comment on “Hacking My Apartment Door with Twilio

  1. Hey I want to do something similar but I don’t want to have the whole thing initiated by pressing the call button. I’d like to trigger the call button somehow from a webservice. I’m sure it depends on the model of the callbox and whether it’s even connected to the cloud, but maybe you ran into something like this during your research.

Leave a Reply

Your email address will not be published. Required fields are marked *