Skip to content

Twilio Function templates for different Voice, SMS, Video, Chat, Sync, etc use cases

License

Notifications You must be signed in to change notification settings

twilio-labs/function-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twilio Function Templates

A Twilio Labs Project

Twilio Functions are a serverless environment to build and run Twilio applications so you can get to production faster. You provide the Node.js code to perform the task you need and Twilio runs it. You can read more about Twilio Functions and how to use them in the introductory blog post.

Attention

With the release of Node v18, the Node.js ecosystem is migrating over from the old CommonJS (CJS) standard to the newer, ES Modules (ESM) standard. Using ESM modules in CJS code is not possible. You can read about the differences in far more detail in this blog Post.. The following snippets may causes errors.

These templates are also available through twilio-run new inside the twilio-run CLI.

Usage

Each Function lives in its own directory within this repo. The easiest way to use the templates is through the Twilio CLI. Check out our docs for the different ways you can use these templates.

Available Functions

Complete list of available functions

Todo

  • Forward message to email with other API providers
  • Generate Twilio Client access token
  • Inbound calls for SIP registration
  • Outbound calls for SIP registration
  • Translate webhook from application/x-www-form-urlencoded into application/json and forward on to another service

Please add ideas if you have them.

Contributing

This project welcomes contributions. Please check out our Contributing guide to learn more on how to get started.

License

MIT © Twilio Inc.