For a couple of days, I've sat down with the Twitter API and tried to integrate it with the 46elks API for a self-deployable solution to make a demo of how to make it possible for me to send SMS to Twitter. The result is the Flask based microservice Passer .
DIY Install Passer on Heroku
Passer still contains quite a bit of rough edges but deployment to
is as simple as A-B-C. You can clone Passer from
and add it to your Heroku apps by executing the Heroku toolchain command
within the repository.
After you've launched the Heroku instance, you'll need to configure a few environment variables for your application. First, head over to apps.twitter.com and create a new app. Within the app, access your consumer key and consumer secret and store them within your Heroku instance's environment variables using
heroku config:set PASSER_TWITTER_KEY=<consumer_key>\ PASSER_TWITTER_SECRET=<consumer_secret>
Next head to
the 46elks dashboard
where you'll configure a number to have the
. While you're at the 46elks dashboard, also retrieve your API username and password and insert them into the environment variables with
heroku config:set PASSER_ELKS_KEY=<api_username>\ PASSER_ELKS_SECRET=<api_password>
Now it's just a matter of running
git push heroku
and voilá, you're up and running. Go to
and follow the link to Twitter where you'll authorize the app and copy the digits Twitter instructs you to enter into Passer by running
Congratulations, you should now be able to send a text message to the number you configured and it'll magically appear on your Twitter wall.
Wow, Passer is really not done. It's not even nearly done. I'd love to actually make this tech demo useful by allowing for persistent OAuth tokens one way or another, but also allowing for you to upload pictures and gifs through MMS. Maybe make it possible for you to get the replies to tweets you've made using Passer?
 Twitter do provide
Twitter over SMS
but it's not available for customers in a lot of countries
 Passer doesn't persistently store OAuth tokens, so you'll have to re-authenticate on every restart of the application
 You can of course deploy Passer to your own server as well using for example uWSGI, but this is sadly not nearly as straight forward
 SE-numbers are €1 a month, but we have this amazing trial-thingy, so you can try Passer without having to spend a krona :D
Written 2015-09-18 12:00 by Emil Tullstedt