Skip to content

mischah/8-bit-revolution

 
 

Repository files navigation

8-bit-revolution

aka "How to send text messages from your static site using Netlify, Twilio and serverless functions

Tell your friends how much you like 8-bit via text (SMS or WhatsApp)... every day! As much as you want!

Website of 8-bit-revolution including "spread the word" and a "send messages button

How does this work?

Using serverless functions you can build all the HTTP endpoints you need to power your static sites (finally!!!). This example site uses Netlify Lambda functions to send messages to all of your friends using the Twilio API. Thanks to the usage of function your authorization token won't be exposed and it's save to use Twilio.

Setup

Deploy to Netlify

To set this project up yourself you can hit the button (👆) which leads you to a one-click install solution. What you need is a Twilio account and number and the numbers of your friends.

Netlify setup dialog

Repository name
Given name of the new repository which will be created in your GitHub account e.g. my-8-bit-revolution
Twilio Account SID
You'll find your account sid in your Twilio console e.g. AC...................
Twilio auth token
You'll find your auth token in your Twilio console e.g. a8...................
(make sure to treat your auth token safe and secure – this article gives guidance)
Bot number
The number you bought on Twilio. This will be the number that will send messages e.g. +4911111111111
Message
The message you want to spread and send your friends e.g. 8-bit rocks
The numbers that should receive the message
A semi-colon seperated list of phone numbers e.g. +491234567890;+490987654321

What did just happen?

By doing the one-click installation dialog on Netlify you created your own copy of 8-bit-revolution.netlify.com.

The process created a new GitHub project in your GitHub account. This project includes all the source code to send SMS from a static site. You can now start and tweak the styles and functionality if you'd like to.

Additionally it set up a webhook connection to redeploy the site every time you push code to the GitHub repository. Magic. 👌

Learn more

You can find out more on how this is done by reading the tutorial on twilio.com.

About

Tell your friends how much you like 8-bit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%