Giter Site home page Giter Site logo

twilio_messager's Introduction

twilio_messager

Twilio Messager is a python programme that sends and receives SMS using SMS-enabled Twilio phone numbers.

Getting Started

Follow these steps to use this application locally.

Install Dependencies

  • Install twilio

    pip install twilio
    
  • Install flask

    pip install -U Flask
    

    OR:

    pip install -r requirements.txt
    

Set Account SID and Auth Token

  1. Go to Twilio console to get your credentials

    get-credentials

  2. Replace YOUR_ACCOUND_SID and YOUR_AUTH_TOKEN in util.py with your own credentials

Connect Twilio to Your App

  1. Download ngrok and Sign up for a free account

  2. Go to ngrok dashboard to get your authtoken

    get-authtoken

  3. Open a terminal in the directory of Ngrok excutable and type

    ngrok authtoken YOUR_NGROK_AUTHTOKEN
    

    Replace YOUR_NGROK_AUTHTOKEN with your own ngrok authtoken. You only need to do this once.

  4. Start ngrok

    ngrok http 5000
    

    You will see the ngrok console UI once it starts.

  5. Add /sms to your ngrok HTTP forwarding URL. Then set it to the webhook address of your number(s) on Twilio console

    http://example.ngrok.io/sms
    

    set-webhook

Usage

Run the main.py script to start the messager

python main.py

Phone Number

Enter phone number starting with +COUNTRY_CODE You may lookup your country code here

Cancel

Add $ to the end of a message or phone number to cancel operation

cancel

Log File

A log file Instance.csv will be automatically if there is no such file in the programme directory. It stores messaging data in the format of Timestamp,Sender,Receiver,Message,Type If there is already an Instance.csv in the programme directory, new logs will be appended to the existing log file.

License

Distributed under the MIT License. See LICENSE.md for more information.

Contact

Project Link: https://github.com/songyuew/twilio_messager

Acknowledgments

twilio_messager's People

Contributors

songyuew avatar

Watchers

 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.