Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free

ngrok posts

  • By Alan Klein
    Gracefully Handle Long Running Asynchronous Operations in Twilio Studio Studio Async Long Running

    As part of a customized interactive IVR experience built on top of Twilio, you often need to fetch data from external APIs. Sometimes, it may take that API more than ten seconds to respond to a request. Ten seconds is the maximum time the Studio HTTP Request Widget and Run Function Widget synchronously waits for a response. What then?

    In this post, I’ll show you how you can architect a solution that will extend Studio’s response times beyond 10 seconds. We also use a Twilio conference with music on hold, to avoid extended periods of silence during these requests.

    Prerequisites

    In order to follow this tutorial, you will need:

    • Ngrok, the localhost tunneling tool, to allow you to run Express locally from your laptop for testing and development
    • Node.js
    • Sample Code
    • Express
    • A Twilio account and active number. If you don’t have an account, go ahead and create one …
    Read More
  • By Matthew Gilliard
    Take control of incoming calls with Twilio, Java and Google Sheets Take Control of Incoming Calls with Twilio, Java and Google Sheets

    We understand how phone numbers work, don’t we? Someone calls your number and your phone rings. But wouldn't it be nice to have more control - to screen incoming calls and treat them differently depending on who is calling?

    Gif of a man answering a phone call

    In this post I’ll show you how to set up a Twilio phone number to handle incoming calls using a Spring Boot app. Your app will look up the caller in a Google Sheet to decide what to do. There are options for blocking calls or forwarding them to other numbers. Any changes made to the Google Sheet will take effect immediately. The sheet looks like this:

    Screenshot of a Google Sheet with Columns for "Caller's Number" and "Action". Action is either "Block" (with a message) or "Forward" (to another phone number)

    Once you’ve set this up you can hand out your Twilio phone number freely, knowing that you can easily block unwanted callers, or redirect people to any other number depending on who they are.

    To set this up you will need:

    • A Google account …
    Read More
  • By Miguel Grinberg
    Automating Ngrok in Python and Twilio Applications With Pyngrok Automating Ngrok in Python and Twilio Applications with Pyngrok

    When you are developing an application that uses Twilio services you need to expose your webhooks on public URLs that can be reached by Twilio. If you have followed some of the tutorials that we published on this blog you know that we recommend using the excellent ngrok tool to generate temporary public URLs for your development web server. Ngrok is an incredibly useful tool that creates a tunnel from a URL on the ngrok.io domain to your application running on your computer. You can then configure your webhook using the ngrok URL and when Twilio sends a request to it, ngrok redirects it to your application.

    If you use ngrok frequently enough, it pays off to become a paid customer, which allows you to secure a permanent URL. But if you only use this service occasionally, it is tedious to have to log into the Twilio Console to …

    Read More
  • By Diane Phan
    Impressing Your Hackathon with Ngrok, Python, and Flask Impressing Your Hackathon with Ngrok, Python, and Flask header

    You might be running on your third cup of coffee and working with webhooks right now. Maybe you’re developing programs with Twilio API services. You might have seen the term ngrok a few times and heard how this tool can solve all of a developer’s problems – but how impressive is it really?

    Follow along to learn more about how ngrok helps you test locally, and allows your program to communicate with a temporary public domain. The URLs make forwarding incoming Twilio SMS requests or other webhooks to your local development setup fast, easy, and impressive!

    As someone who used to attend and organize hackathons, I can tell you that ngrok will impress not only the organizers and judges, but also your team!

    Tutorial Requirements

    If you have a Mac, you can download the ngrok client as a file in …

    Read More
  • By Phil Nash
    Send and track faxes with the Twilio Fax API using Sinatra and Ruby Send and track faxes with the Twilio Fax API using Sinatra and Ruby

    It happened! I've been waiting for the moment I needed to send a fax since Twilio launched the Programmable Fax API back in 2017 and this week it finally happened! I won't go into detail about what I needed to send, but it's safe to say the medical profession could consider their communication choices for the future.

    I could have sent the fax by uploading a PDF to Twilio Assets and using the API explorer, but that wouldn't have been as fun as over-engineering an entire application to send and track the fax to make sure it arrived and be prepared for any future fax situations.

    In this post I'll share how to build an application for sending and tracking faxes, but if you have faxes to send and want to jump straight into using it, you can find all the source code on GitHub.

    Weapons of choice …

    Read More
  • By Chuks Opia
    Create SMS Notifications from Tweets, Retweets, and Mentions with JavaScript and Twilio SMS Copy of Generic Blog Header 3-6.png

    Social media has become one of the biggest hits of the 21st century. It has become predominant in both personal and professional lives of millions of people. This has made social media marketing a powerful tool for businesses of all sizes to reach prospects and customers.

    Twitter recently announced Q1 2019 revenues of $787 million, a year-on-year increase of around 20%. This means the platform is seeming ever more attractive to advertisers looking for high return on spend. Receiving real-time SMS notifications for activities on a Twitter account is a good way for businesses to build better customer engagement.

    In this post you will learn how to get SMS notifications whenever an event occurs on your Twitter account.

    Prerequisites

    To build the case study project for this post you need to have the following development tools installed on your system:

    Node.js JavaScript runtime environment (The Node.js installer includes the npm …

    Read More
  • By Marcus Battle
    How to Create a WebSocket Server in PHP with Ratchet for Real-Time Applications Build a PHP WebSocket Server

    When WebSockets are discussed, PHP is rarely included in the conversation due to its lack of native support. Additionally, Apache, the HTTP server PHP normally runs on, is not built with persistent connections in mind which forces the responsibility of implementation onto 3rd party libraries.

    While there have been great attempts to bring PHP into the discussion of “real-time” development, most have paled in comparison to the Ratchet project; a PHP WebSocket library for serving real-time bi-directional messages between clients and server.

    In this tutorial, we will be using Ratchet with PHP to learn how to create a simple WebSocket server that processes messages sent from an HTML form in real time. Our form will display a single <input> and <button> to send a message to all client browsers. Every time the user sends a message their message will be displayed in real time on the other screens.

    This …

    Read More
  • By Matt Makai
    Localhost Tunneling with Ngrok on Mac OS X Localhost tunneling with Ngrok on Mac OS X

    A localhost tunnel comes in handy when you want to share an application running in your local development environment via a publicly-accessible URL. In this quick 2 minute video we will learn how the localhost tunneling tool Ngrok works then download and run it on Mac OS X:

    Now you’re ready to share your local in-progress applications with others before you perform a full-blown deployment.

    Links & More Resources

    We used a couple of resources in the above video:

    Learn more about how to configure and use Ngrok with these tutoria …

    Read More
  • By Kyle Kelly-Yahner
    Building A Dad Joke SMS Slack Bot In Python bloglead.001

    Did you hear the preamble joke the guy told before showing you how to build a SMS Dadjoke Slackbot in Python?

    A phone is lost in the jungle, and gets tangled in a thicket of vines. It sees a python and says “Hey can you cut me some Slack?”

    [I’ll pause while you mentally prepare yourself for an onslaught of Dad jokes]

    Our Dadbot will text you terribly awesome jokes when you @ mention it in its Slack channel. Dadbot will also drop a quality Dad joke in a Slack channel when you text a Twilio number. This is the power of the Slack API combined with the Twilio SMS API — Dad jokes abound.

    What We’ll Need

    My dad doesn’t go anywhere without cargo pants, extra napkins stuffed in his pocket, and a map. We will also need a few precious items before heading out to build Dadbot.

    Read More
  • By Kyle Kelly-Yahner
    Local Telephone Numbers Rocking In The Free World (Through The Ngrok Data Center Closest To You) blogglobalconf

    Grab your phone. We’re going to try out ngrok’s new local traffic routing feature using local Twilio numbers in the US, EU, AP, and Australia.

    Still got your phone in hand? Good. Welcome to Operation Keep On Ringing In The Free World. We’re going to buy four Twilio phone numbers in the four different ngrok data center territories and make them play music from local artists, piped through ngrok’s local data centers.

    What You’ll Need

    A Twilio Account
    The latest version of ngrok.

    Local Numbers, Local ngrok Data Centers, Local Music

    The first place we’ll stop on Operation Keep It Ringing etc... is the US of A. Representing the US is Bruce Springsteen.

    First, head to Twilio.com and buy an US phone number. Then store the song you to play to your listeners on in a directory called “Jams”. We’ll keep all our code here as well.

    Fire up …

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.