All Projects → krismuniz → botkit-sms

krismuniz / botkit-sms

Licence: other
Twilio Programmable SMS implementation for Botkit.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to botkit-sms

Botkit
Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.
Stars: ✭ 10,555 (+58538.89%)
Mutual labels:  twilio, botkit, sms
Twilio Csharp
Twilio C#/.NET Helper Library for .NET Framework 3.5+ and supported .NET Core versions
Stars: ✭ 541 (+2905.56%)
Mutual labels:  twilio, sms
Dial2verify Twilio
Phone verification at no cost
Stars: ✭ 432 (+2300%)
Mutual labels:  twilio, phone-number
30 Days Of Python 3.6
This is a soon-to-be archived project version of 30 Days of Python. The original tutorial still works but we have an updated version in the works right now.
Stars: ✭ 98 (+444.44%)
Mutual labels:  twilio, sms
React Native Phone Verification
The best React Native example for phone verification (an alternative to Twitter Digits).
Stars: ✭ 332 (+1744.44%)
Mutual labels:  twilio, sms
Spoke
mass-contact text/SMS distribution tool
Stars: ✭ 367 (+1938.89%)
Mutual labels:  twilio, sms
Faxserver
Send and Receive Faxes Using The Twilio Programmable Fax API.
Stars: ✭ 92 (+411.11%)
Mutual labels:  twilio, sms
sample-template-nodejs
A template repository serving as the base for new Twilio sample apps
Stars: ✭ 16 (-11.11%)
Mutual labels:  twilio, sms
Simple Sms
Send and receive SMS messages with Laravel
Stars: ✭ 181 (+905.56%)
Mutual labels:  twilio, sms
plivo
This package enables to send message or OTP to any mobile.This package uses external plivo api.
Stars: ✭ 20 (+11.11%)
Mutual labels:  twilio, sms
apostello
sms for your church
Stars: ✭ 62 (+244.44%)
Mutual labels:  twilio, sms
Gotwilio
Twilio library for Go (golang).
Stars: ✭ 328 (+1722.22%)
Mutual labels:  twilio, sms
laravel-authy
Rinvex Authy is a simple wrapper for @authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.
Stars: ✭ 35 (+94.44%)
Mutual labels:  twilio, sms
Twilio Java
A Java library for communicating with the Twilio REST API and generating TwiML.
Stars: ✭ 371 (+1961.11%)
Mutual labels:  twilio, sms
dj-twilio-sms
Twilio SMS Integration for Django
Stars: ✭ 15 (-16.67%)
Mutual labels:  twilio, sms
Authy
Rinvex Authy is a simple wrapper for @Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.
Stars: ✭ 34 (+88.89%)
Mutual labels:  twilio, sms
module-twilio
Magento 2 Customer SMS notifications with Twilio
Stars: ✭ 29 (+61.11%)
Mutual labels:  twilio, sms
actions-sms
Send an SMS through GitHub Actions
Stars: ✭ 108 (+500%)
Mutual labels:  twilio, sms
useful-twilio-functions
A set of useful Twilio Functions.
Stars: ✭ 53 (+194.44%)
Mutual labels:  twilio, sms
PySMS
Simple Python API that that allows you to send texts via SMTP with a best effort approach and process replies via IMAP
Stars: ✭ 19 (+5.56%)
Mutual labels:  twilio, sms

🚨Deprecated in favor of botkit!

The official Botkit project now supports Twilio SMS! Install botkit instead. If you already use botkit-sms please consider switching as this project is no longer maintained.

botkit-sms

npm Dependency Status Code-Style:Standard License:MIT

botkit-sms allows you to create conversational SMS apps ("bots") via Twilio's Programmable SMS API using Botkit's familiar interface.

It takes advantage of Botkit's core functionality thus allowing you to create complex conversational flows via a simple interface. It also allows you to use custom storage methods/systems to enable data persistence across sessions.

What is Botkit?

Here's an excerpt of Botkit's readme.md file:

[Botkit] provides a semantic interface to sending and receiving messages so that developers can focus on creating novel applications and experiences instead of dealing with API endpoints.

Use Case

You can use botkit-sms to build SMS bots with moderately-complex conversational flows.

Installation

$ npm install --save botkit-sms

Usage

Note: This document assumes that you are familiarized with Botkit and Twilio's Programmable SMS API

To connect your bot to Twilio you must point a Messaging webhook to http://your_host/sms/receive, after doing so, every Twilio message will be sent to that address.

Then you need to write your bot. First, create a TwilioSMSBot instance and pass an object with your configuration properties:

const TwilioSMSBot = require('botkit-sms')
const controller = TwilioSMSBot({
  account_sid: process.env.TWILIO_ACCOUNT_SID,
  auth_token: process.env.TWILIO_AUTH_TOKEN,
  twilio_number: process.env.TWILIO_NUMBER
})

spawn() your bot instance:

let bot = controller.spawn({})

Then you need to set up your Web server and create the webhook endpoints so your app can receive Twilio's messages:

controller.setupWebserver(process.env.PORT, function (err, webserver) {
  controller.createWebhookEndpoints(controller.webserver, bot, function () {
    console.log('TwilioSMSBot is online!')
  })
})

And finally, you can setup listeners for specific messages, like you would in any other botkit bot:

controller.hears(['hi', 'hello'], 'message_received', (bot, message) => {
  bot.startConversation(message, (err, convo) => {
    convo.say('Hi, I am Oliver, an SMS bot! :D')
    convo.ask('What is your name?', (res, convo) => {
      convo.say(`Nice to meet you, ${res.text}!`)
      convo.next()
    })
  })
})

controller.hears('.*', 'message_received', (bot, message) => {
  bot.reply(message, 'huh?')

  // send an image
  bot.reply(message, {
    body: 'Optional body to go with text',
    mediaUrl: 'https://i.imgur.com/9n3qoKx.png'
  })
})

See full example in the examples directory of this repo.

Reference

Please see botkit's guide and reference document here.

Contributing

This project is no longer maintained. Consider forking or –better yet– contributing to the official Botkit instead.

License

The MIT License (MIT)

Copyright (c) 2016 Kristian Muñiz

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].