All Projects → twilio-labs → plugin-rtc

twilio-labs / plugin-rtc

Licence: Apache-2.0 license
Twilio CLI plugin which supports developing and deploying real-time communication apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to plugin-rtc

first-twilio-video-application
A demo of Twilio Video for the Build your first Twilio Video application webinar.
Stars: ✭ 16 (-54.29%)
Mutual labels:  twilio, twilio-video, twilio-functions
serverless-api
Node.js library to manage deploy Serverless Functions
Stars: ✭ 14 (-60%)
Mutual labels:  twilio, twilio-functions
terraform-provider-twilio
Terraform provider for Twilio. 🌎☎️ Preserved for archaeological fun. Please see the official Twilio TF provider @ https://github.com/twilio/terraform-provider-twilio.
Stars: ✭ 32 (-8.57%)
Mutual labels:  twilio
somleng
Open Source Implementation of Twilio's REST API
Stars: ✭ 33 (-5.71%)
Mutual labels:  twilio
org-mode-sms-inbox
Harvest org-mode todos with Dropbox, Twilio, and IFTTT.
Stars: ✭ 19 (-45.71%)
Mutual labels:  twilio
twilio-video-room-monitor.js
A browser-based tool that displays information and metrics about Twilio Video JavaScript applications
Stars: ✭ 22 (-37.14%)
Mutual labels:  twilio
twilio-client.js
Twilio’s Programmable Voice JavaScript SDK
Stars: ✭ 63 (+80%)
Mutual labels:  twilio
twilio-chat-demo-android
Chat API Demo Application for Android
Stars: ✭ 64 (+82.86%)
Mutual labels:  twilio
SMS-Dial-up-App
Android app for SMS-based Dial-up
Stars: ✭ 26 (-25.71%)
Mutual labels:  twilio
twilito
A tiny, zero dependency Ruby helper for sending text messages with Twilio 💬
Stars: ✭ 16 (-54.29%)
Mutual labels:  twilio
Node-js-functionalities
This repository contains very useful restful API's and functionalities in node-js containing many important tutorial code for mastering node-js, all tutorials have been published on medium.com, tutorials link is given below
Stars: ✭ 69 (+97.14%)
Mutual labels:  twilio
PokerTexter
SMS App for Poker Odds. Runs on Flask + Twilio + Heroku.
Stars: ✭ 17 (-51.43%)
Mutual labels:  twilio
human-call-filter
Captcha for phone calls
Stars: ✭ 41 (+17.14%)
Mutual labels:  twilio
twilio-go
Twilio Go library
Stars: ✭ 136 (+288.57%)
Mutual labels:  twilio
video-access-token-server-php
Twilio Video server-side web app in PHP
Stars: ✭ 26 (-25.71%)
Mutual labels:  twilio-video
personal-wealth-portfolio-mgt-bot
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. This repository will be kept available in read-only mode.
Stars: ✭ 43 (+22.86%)
Mutual labels:  twilio
twilio-voice.js
Twilio's JavaScript Voice SDK
Stars: ✭ 21 (-40%)
Mutual labels:  twilio
module-twilio
Magento 2 Customer SMS notifications with Twilio
Stars: ✭ 29 (-17.14%)
Mutual labels:  twilio
contoso-university
Contoso University demo using asp net core and related technologies
Stars: ✭ 42 (+20%)
Mutual labels:  twilio
imessage-chatbot
💬 Recurrent neural network -- generates messages in your style of speech! Trained on imessage data. Sqlite3, TensorFlow, Flask, Twilio SMS, AWS.
Stars: ✭ 33 (-5.71%)
Mutual labels:  twilio

@twilio-labs/plugin-rtc

npm CircleCI

This plugin adds functionality to the Twilio CLI which supports developing and deploying real-time communication apps.

Getting Started

Install the Twilio CLI

Via npm or yarn:

$ npm install -g twilio-cli
$ yarn global add twilio-cli

Via homebrew:

$ brew tap twilio/brew && brew install twilio

See the Twilio CLI documentation for more information.

Install the plugin for general use

The following step will install the plugin from NPM and is recommended if you are interested in trying out the commands in the latest release.

$ twilio plugins:install @twilio-labs/plugin-rtc

Install the plugin for local development

The following step will install the plugin from a local directory. Use this option if you are interested in modifying the plugin and testing it out from the Twilio CLI.

$ twilio plugins:link /path/to/plugin-rtc

Supported Apps

This plugin currently supports the following applications:

Twilio Video App

A mobile and web collaboration application built with Twilio Programmable Video. Visit the projects below for instructions on how to use this plugin to build and deploy the Twilio Video app.

Token Server API Documentation

The following section documents the application token server used to provide Programable Video access tokens to supported Twilio Video applications. The token server is deployed as a Twilio Function.

Method URL
POST /token

Authentication

The application token server requires an authentication mechanism to be specified when deploying. The following section documents each supported authentication mechanism.

Passcode

Each request is verified using a passcode generated at deploy time. Passcodes remain valid for one week. After the passcode expires, users can redeploy an application and a new passcode will be generated. The snippet below provides an example request body used by a supported application.

{
  "passcode": "12345612341234",
  "user_identity": "User",
  "room_name": "Demo",
}

Token

This endpoint returns a Programmable Video Access token. When create_room is true, it will create a room, and when create_conversation is true, it will create a Twilio Conversation associated with the room. This token is used by the above mentioned Video Apps to connect to a video room and a conversation.

POST /token

Parameters

Name Type Description
passcode string Required. The application passcode.
user_identity string Required. The user's identity.
room_name string Required when create_room is true A room name that will be used to create a token scoped to connecting to only one room.
create_room boolean (default: true) When false, a room will not be created when a token is requested.
create_conversation boolean (default: false) When true, a Twilio Conversation will be created (if it doesn't already exist) and a participant will be added to it when a token is requested. create_room must also be true.

Success Responses

Status Response
200
{
  "token": "0000000000000000.0000000000000000000000.00000000000000000",
  "room_type": "group" | "group-small" | "peer-to-peer"
}

Error Responses

Status Response
400
{
  "error": {
    "message": "missing user_identity",
    "explanation": "The user_identity parameter is missing."
  }
}
401
{
  "error": {
    "message": "passcode expired",
    "explanation": "The passcode used to validate application users has expired. Re-deploy the application to refresh the passcode."
  }
}
401
{
  "error": {
    "message": "passcode incorrect",
    "explanation": "The passcode used to validate application users is incorrect."
  }
}
400
{
  "error": {
    "message": "invalid parameter",
    "explanation": "A boolean value must be provided for the create_room parameter"
  }
}

Recording Rules

Changes the Recording Rules for a given room SID.

POST /recordingrules

Parameters

Name Type Description
passcode string Required. The application passcode.
room_sid string Required. The SID of the room to change the recording rules of.
rules array Required. An array of recording rules to apply to the room.

Success Responses

Status Response
200
{
  "roomSid": "RM00000000000000000000000000000000",
  "rules": [
    {
      "all": true,
      "type": "exclude"
    }
  ],
  "dateCreated": "2020-11-18T02:58:20.000Z",
  "dateUpdated": "2020-11-18T03:21:18.000Z"
}

Error Responses

Status Response
400
{
  "error": {
    "message": "missing room_sid",
    "explanation": "The room_sid parameter is missing."
  }
}
400
{
  "error": {
    "message": "missing rules",
    "explanation": "The rules parameter is missing."
  }
}
401
{
  "error": {
    "message": "passcode incorrect",
    "explanation": "The passcode used to validate application users is incorrect."
  }
}

Commands

twilio rtc:apps:video:delete

Delete a Programmable Video app

USAGE
  $ twilio rtc:apps:video:delete

OPTIONS
  -l=(debug|info|warn|error|none)  [default: info] Level of logging messages.
  -p, --profile=profile            Shorthand identifier for your profile.

EXAMPLE
  $ twilio rtc:apps:video:delete
  Successfully deleted app.

twilio rtc:apps:video:deploy --authentication <auth>

Deploy a Programmable Video app

USAGE
  $ twilio rtc:apps:video:deploy --authentication <auth>

OPTIONS
  -l=(debug|info|warn|error|none)               [default: info] Level of logging messages.
  -p, --profile=profile                         Shorthand identifier for your profile.
  --app-directory=app-directory                 Name of app directory to use
  --authentication=(passcode)                   (required) Type of authentication to use
  --override                                    Override an existing App deployment
  --room-type=(group|group-small|peer-to-peer|go)  [default: group] Set room type
  --[no-]ui-editable                               Specifies whether the app's files and variables can be edited in the Twilio console.

DESCRIPTION
  This command publishes two components as a Twilio Function: an application token
  server and an optional React application.

  Token Server
  The token server provides Programmable Video access tokens and authorizes
  requests with the specified authentication mechanism.

  React Application
  The commands includes support for publishing a Programmable Video React
  Application. For more details using this plugin with the Programmable Video
  React application, please visit the project's home page.
  https://github.com/twilio/twilio-video-app-react

EXAMPLES
  # Deploy an application token server with passcode authentication
  $ twilio rtc:apps:video:deploy --authentication passcode
  deploying app... done
  Passcode: xxx xxx xxxx xxxx
  Expires: Mon Mar 09 2020 16:36:23 GMT-0600
  Room Type: group
  Edit your token server at: https://www.twilio.com/console/functions/editor/...

  # Deploy an application token server with the React app
  $ twilio rtc:apps:video:deploy --authentication passcode --app-directory /path/to/app
  deploying app... done
  Web App URL: https://video-app-xxxx-xxxx-dev.twil.io?passcode=xxxxxxxxxxxxxx
  Passcode: xxx xxx xxxx xxxx
  Expires: Mon Mar 09 2020 16:36:23 GMT-0600
  Room Type: group
  Edit your token server at: https://www.twilio.com/console/functions/editor/...

  # Override an existing app with a fresh deployment
  # Please note that this will remove a previously deployed web application if no
  # app directory is provided
  $ twilio rtc:apps:video:deploy --authentication passcode --override
  Removed app with Passcode: xxx xxx xxxx xxxx
  deploying app... done
  Passcode: yyy yyy yyyy yyyy
  Expires: Mon Mar 09 2020 16:36:23 GMT-0600
  Room Type: group
  Edit your token server at: https://www.twilio.com/console/functions/editor/...

  # Deploy an application token server with a specific room type
  $ twilio rtc:apps:video:deploy --authentication passcode --room-type peer-to-peer
  deploying app... done
  Passcode: xxx xxx xxxx xxxx
  Expires: Mon Mar 09 2020 16:36:23 GMT-0600
  Room Type: peer-to-peer
  Edit your token server at: https://www.twilio.com/console/functions/editor/...

twilio rtc:apps:video:view

View a Programmable Video app

USAGE
  $ twilio rtc:apps:video:view

OPTIONS
  -l=(debug|info|warn|error|none)  [default: info] Level of logging messages.
  -p, --profile=profile            Shorthand identifier for your profile.

EXAMPLE
  $ twilio rtc:apps:video:view
  Web App URL: https://video-app-1111-dev.twil.io?passcode=xxxxxxxxxxxxxx
  Passcode: xxx xxx xxxx xxxx
  Room Type: group
  Edit your token server at: https://www.twilio.com/console/functions/editor/...
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].