Nexmo Community Laravel Sms Save

A simple Laravel web application that shows how to send and receive SMS using Nexmo.

Project README

Sending an Receiving SMS with Laravel

A simple Laravel web application that shows how to send and receive SMS using Nexmo.

For a more up-to-date version with WhatsApp and Laravel 7, try this: https://github.com/nexmo-community/laravel-messages

Prerequisites

Getting Started

Clone the repo:

git clone [email protected]:nexmo-community/laravel-sms.git
cd laravel-sms

Add configuration information to .env:

...
NEXMO_API_KEY=YOUR_KEY
NEXMO_API_SECRET=YOUR_SECRET
NEXMO_NUMBER=YOUR_NUMBER

Set your application key to a random string:

php artisan key:generate

Start the Laravel application:

php artisan serve

Start ngrok:

ngrok http 8000

Link your Nexmo phone number to the /sms/receive webhook endpoint. Replace YOUR_NUMBER with your Nexmo registered number and NGROK_SUBDOMAIN with the subdomain assigned to you by ngrok in the previous command:

nexmo link:sms YOUR_NUMBER https://NGROK_SUBDOMAIN.ngrok.io/sms/receive

Navigate to http://localhost:8000/sms/send/NUMBER replacing NUMBER with a real number in order to send an SMS to that number.

Send an SMS to the Nexmo registered YOUR_NUMBER in order to send a message to the Laravel application and get an auto-reply.

For detailed instructions please see the tutorial.

Tutorial

Published on Laravel News: https://laravel-news.com/sending-receiving-sms-laravel-nexmo

License

MIT license.

Open Source Agenda is not affiliated with "Nexmo Community Laravel Sms" Project. README Source: nexmo-community/laravel-sms
Stars
30
Open Issues
9
Last Commit
4 days ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating