DEV Community

Amanda Cavallaro for Vonage

Posted on • Originally published at learn.vonage.com on

2

Send and Receive SMS Messages with Firebase Functions | One Dev Minute

Welcome to One Dev Minute! This series is hosted on the Vonage Dev YouTube channel. The goal of this video series is to share knowledge in a bite-sized manner.

This quick walk-through will show you how to create an SMS message log and a response to the sender using Firebase Cloud Functions and the Real Time Database alongside the Vonage SMS API.

Transcript

You can send SMS messages using Cloud Functions for Firebase.

You'll need to create a couple of accounts:

  • a Firebase
  • and a Vonage API one.

Create the project in the Firebase console and choose whether or not you will use Analytics.

Wait for your project to be created.

Select the Firebase billing plan, in this case, it is the pay as you go.

In the Command line, install the Firebase tools.

Login to Firebase and authenticate. Create the project folder and change directory inside of it.

Initialize the Cloud Functions for Firebase.

Install the dependencies we are going to use inside the functions folder.

Create a .env file and add the Vonage environment variables there.

Inside the file index.js, add all the required dependencies and environment variables and initialize Firebase.

In the same file, create the first function which will act as a webhook to capture and log incoming SMS messages from a Vonage phone number.

Let's then create a function for Firebase to send the response SMS and to react to database updates.

Deploy the function, send an SMS message from your phone to the Vonage application phone number.

You'll then receive a response SMS message on your phone and an update to Firebase Real-Time Database.

You can find the full code on GitHub. Thank you for watching and happy coding!

Links

This Tutorial's Code on GitHub.

Find the Written Tutorial Here.

Check Out the Developer Documentation.

Details About Vonage SMS Functionality.

Getting Started with Firebase Functions.

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️