Start a new Twilio Functions project the easy way
If you're building a Twilio project you will inevitably need to run some code in response to an incoming webhook request. One of the easiest ways to do this is with Twilio Functions, our serverless platform for running Node.js. Recently my colleague Dominik released the
twilio-runpackage that makes it easier to develop, test and debug Twilio Functions locally.
I wanted to make it even easier to get started with a Twilio Functions project, so I built a project generator called
Let's take a look at how you can easily start and develop a Twilio Functions project using
There are a few ways you can use
create-twilio-function. The easiest is if you have
npmversion 6 or higher. You can check this out on the command line with:
$ npm --version 6.9.0
If you don't have an up to date version of ...
Locally developing and debugging Twilio Functions
Twilio is all about HTTP endpoints & webhooks. From responding to incoming SMS, to controlling the flow of a voice call to blocking unwanted chat messages with an
onMessageSendwebhook, chances are that you'll end up writing an HTTP endpoint for the Twilio product you're interacting with. Twilio Functions allow you to write and host those endpoints directly in the Twilio cloud while relying on the power of Node.js.
What if you want to develop these functions with your IDE or editor of choice and run them locally? What if something goes wrong and you want to use your debugger to dive deeper into it? For this reason I built
twilio-run, a command-line tool that allows you to run your Twilio Functions in your local environment.
Let's dive into how it works, and how it can help your development flow with Twilio.
Re-Introducing the Hackpack v4: Twilio's Open Source Hardware Badge
This year’s Hackpack was our most advanced yet. Sporting a joystick, 7 buttons, a touchscreen, a massive battery, and Linux on a Raspberry Pi Zero W, we hoped to craft the perfect badge for both our conference and your next handheld computing project.
We also designed it with a special goal in mind: to release under an open hardware license. That’s why today we’re proud to announce the hardware collateral and assembly instructions are available under the Solderpad 2.0 license.
Building Twilio’s Hardware Badge
Keeping Track of GitHub Pull Requests with Python and Twilio SMS
If you're working on an urgent project in GitHub with other developers, it's handy to get immediate notifications by SMS. However, there is no SMS option out of the box! So I said, “Enough is enough; I'll start my own notification system!”
In this tutorial, I'll walk you through the steps of building out the beginnings of a notification system for GitHub pull requests. More specifically, we will use the GitHub and Twilio APIs in Python to send texts notifying you when a new pull request has been submitted.
First, we have to set our environment up. This guide was written in Python 3.6. If you haven't already, download Python and Pip. Next we will install
virtualenvto create and activate your virtual environment by entering the followings command in your command-line:
pip3 install virtualenv==15.1.0 python3 -m venv ghpull cd ghpull source ./bin/activate ...
Continuous Delivery with Jenkins and GitHub
If you can set up a project server once, you can set up Jenkins to deploy that project again and again as you develop, maintain, and expand it.
In this post we will set up a multi-stage deploy server and the Jenkins jobs we need for continuous delivery. By the end you will know how to set up a server and Jenkins jobs to automatically deploy successfully built branches into each environment.
In a previous post we set up a dedicated Jenkins Server and gave it access to our projects’ GitHub account with an SSH key.
We will use a PHP project as an example, but we’ll also talk about how these same steps can be used to deploy most web projects regardless of language, framework, or other considerations.
In order to follow along with this post, you will need the following:
- A PHP project with a repository ...
Creating a Jenkins Server for GitHub Projects
A deploy process should provide consistency, incorporate tests, and utilize a multi stage deploy process to protect your production server, provide useful logging, catch breaking changes quickly, and integrate smoothly with your version control software.
There are a few options available for managing a deploy process like this. Many of these are managed services which means much of it is opaque and outside your control. If you’re like me, you’d rather have total access to and control of your deploy chain. The best option for control freaks like us, is Jenkins.
This post will walk through creating a dedicated Jenkins server and setting it up with an SSH key on your GitHub account.
Moving forward this post will assume a few things about you and your project:
Introducing Twilio’s guardrail
We’ve all been there, alternating between JIRA and a blinking cursor wondering “What does this API even look like?”
That question is the bane of productivity and a spoiler of successful cross-team collaboration. Attempts to consume anything other than a perfectly documented API hit speed-bumps, if not complete show-stoppers.
You may have heard of Swagger, OpenAPI Initiative‘s API specification language. With Swagger, we can write a specification file as well as consume it programmatically via tools like Swagger Editor, swagger-api/swagger-codegen, or anything capable of reading and verifying JSON Schema. Today we’re proud to introduce guardrail, a framework for providing principled code-generation in type-safe languages and frameworks.
API Documentation: progress over perfection
One challenge for a microservice is to adhere to its contracts. As we’ve already seen, it’s possible to document the overall structure of an API fairly accurately. Given that fact, how do we ...
Twilio Open Source Rapid Response Kit Adds Heroku Button and New Volunteer Tool
Earlier this year, we released the Rapid Response Kit (RRK), a set of open source tools built for disaster relief efforts. The RRK lets first responders deploy much needed communication apps in minutes.
The community response was incredible with developers offering their contributions to the project. Most recently the RRK was deployed by the Rhode Island Code for America fellows for the Providence Student Union to rally support through SMS broadcast on changing legislation around free bus passes for students.
Today, we have two new capabilities in the RRK including a brand new tool and a one-click hosting addition that makes it even easier to deploy.
One-click Deploys with Heroku Button
The RRK includes tools that require full hosting in order to send and receive calls or messages. The recent launch of Heroku Button fits right in with our open source tools, and is perfect for those looking to quickly ...
Open Source Tools for Nonprofits: Twilio.org Github Launches with Rapid Response Kit
In disaster recovery situations communications technologies are essential for rescue teams in the field, people in need of help, or connecting with family members to make sure they are ok. Many times these tools are built on the spot based on needs and sometimes the final apps aren’t deployed in time for the people that really need them.
What if there were simple tools that any developer or organization could deploy at a moment’s notice? What if these tools were open source and powered by the community? We started the Twilio.org initiative to support nonprofits better through technology and amplify their efforts with communications. Today is our first step in cultivating open source resources for disaster relief and nonprofit needs.
Meet the Twilio.org Open Source Rapid Response Kit, Fork it Now
From emergency response to community organization, we built the basic communications apps you need so ...
Twilio Open Sources Stashboard, the Status Dashboard
Some of you may have noticed Twilio’s shiny new API Status page at http://status.twilio.com. We’re excited to announce that Twilio finally has a modern status page and not only that, we open source it! Yup, you too can download the code and host your own SaaS or API status page. Learn more at http://www.stashboard.org.
Stashboard is a status dashboard for APIs and software services. It’s similar to the Amazon AWS Status Page or the Google Apps Status Page. Businesses and individuals have come to rely on hosted APIs and cloud service providers for email, CRM, sales, phones and more, however, many have poor or non-existent status pages. Enter Stashboard!
Stashboard is designed to provide a generic status dashboard for any hosted service or API. The code can be downloaded, customized, and run on any Google App Engine account ...
We're standing on the shoulders of giants. Software isn’t — and shouldn’t be — a zero-sum game. Collaboration binds communities together. Open Source helps all of us build more powerful services, faster than ever before.
At Twilio, we're always on the lookout for ways we can help keep that innovation going and pay it forward. Learn what we’ve been up to, and how you can contribute.
Code of Conduct
Your safety and comfort are important to us. Codes of Conduct let everyone know what’s expected, so we can do a better job of interacting with one another. All contributions to and interactions with Twilio's open-source projects have to adhere to our Code of Conduct.
You can report violations at firstname.lastname@example.org.
We believe that a Code of Conduct is important to create welcoming open-source communities. If you want to learn more about adding a Code of Conduct to your projects check out the Open Source Guides or the Covenant Code of Conduct.
Whatever your skill level might be, we have a variety of projects you can contribute to. Coding isn’t required, either. We love documentation improvements and bug reports. Here are a few projects you might want to check out:
Guardrail is a code generation tool, capable of reading from OpenAPI/Swagger specification files and generating Scala source code, primarily targeting the akka-http and http4s web frameworks, using circe for JSON encoding/decoding.
Our Node.js & oclif powered Twilio CLI to interact with Twilio directly from the command-line.
Re-useable React components based on the SendGrid Style Guide. See them in action here.
A CLI tool to run and debug Twilio Functions locally.
This tool is intended to help make managing multiple Github repositories much easier for DX, DevRel, and Open Source Engineering teams.
With the fourth version of our Hackpack we decided to build an open-source hackable badge powered by the Raspberry PI Zero. You can find both the hardware specs as well as the firmware on our GitHub for you to build your own or modify our existing ones.
Podcast: Some Coding Required
Some Coding Required is a podcast about all things open source. Hosted by Twilio SendGrid’s Senior Developer Experience Engineer, Elmer Thomas. Episodes will share answers to questions from the open source community, industry news, efficiency-focused hacks and apps, deep dives on open source topics, and more.
Contributing to Open Source for the First Time
Entering the world of Open Source and contributing to a project for the first time can be intimidating. In order to help you get comfortable with your first contribution, we created a mission in our Twilio Quest system that will guide you through it.