GithubHelp home page GithubHelp logo

twiliodeved / receive-mms-laravel Goto Github PK

View Code? Open in Web Editor NEW
7.0 18.0 5.0 252 KB

PHP 88.71% CSS 0.09% HTML 2.35% JavaScript 2.79% Vue 0.59% Shell 0.08% Dockerfile 1.41% SCSS 1.12% Blade 2.86%
twilio-sms

receive-mms-laravel's Introduction

Twilio

Recieve SMS and MMS Messages. Powered by Twilio - PHP/Laravel

Build Status

Use Twilio to receive SMS and MMS messages. For a step-by-step tutorial see the Twilio docs.

Note: protect your webhooks

Twilio supports HTTP Basic and Digest Authentication. Authentication allows you to password protect your TwiML URLs on your web server so that only you and Twilio can access them.

Learn more about HTTP authentication here, which includes sample code you can use to secure your web application by validating incoming Twilio requests.

Local development

First you need to install PHP and Composer.

To run the app locally:

  1. Clone this repository and cd into it

    git clone [email protected]:TwilioDevEd/receive-mms-laravel.git && \
    
    cd receive-mms-laravel
  2. Install dependencies

    composer install
  3. Copy the sample configuration file and edit it to match your configuration

    cp .env-example .env

    You can find your TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN in your Twilio Account Settings. You will also need a TWILIO_NUMBER, which you may find here.

    Run source .env to export the environment variables

  4. Generate application key

    php artisan key:generate
  5. Create database file and run migrations:

    touch ./database/database.sqlite && \
    php artisan migrate --force
  6. Run the application

    php artisan serve --port 8000
  7. Run ngrok:

    ngrok http 8000
    

Be sure to copy the ngrok http url and associate it with your Twilio Phone Number in your twilio console. The incoming SMS webhook url for your number should be as follows: https://<given-ngrok-domain>/api/incoming

  1. Check it out at http://localhost:8000

That's it

Run the tests

You can run the tests locally by typing

phpunit

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

receive-mms-laravel's People

Contributors

bradenkeith avatar dependabot-preview[bot] avatar dprothero avatar jefflinwood avatar joliveros avatar lopenchi avatar mmena1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.