Giter Site home page Giter Site logo

simple-opt-out's Introduction

Simple Opt Out Example

This example shows how to setup simple opt-out verification.

Setup

1. Download Repo

git clone https://github.com/pBread/Simple-Opt-Out.git
cd simple-opt-out

2. Purchase a phone number in your Twilio Console.

3. Add the environment variables per .env.example

ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OPT_OUT_PHONE=+12223334444

4. Start Go

go run .

5. Create ngrok tunnel on :8080 (or create a public URL in some other way)

ngrok http 8080

6. Assign the inbound SMS webook to the /opt-out/reply route

Usage

Initiate the verification process by going to http://localhost:8080/opt-out/new?to=+12223334444, but replace the phone number with your personal phone number. You should receive an SMS message.

Reply to the text message with and w/out the keyword TESTER to see what happens.

NOTE: This example does not unsubscribe you when you respond with the keyword. You need to update func unsubscribe with the necessary logic to disable the user/post in your database.

simple-opt-out's People

Contributors

pbread avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.