Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Runtime Client

Twilio Runtime Client provides a simple and intuitive way of orchestrating the various parts of the Twilio Runtime. Using the Runtime Client, developers can reference other Functions to better organize their code, and access configuration stored in Assets.

Runtime Client Methods

Method Return Type Description
getAssets() Array of Assets Provides an array of Asset objects that can be used to retrieve files served on Twilio Assets.
getFunctions() Array of Functions Provides an array of Function objects that can be used to compose code hosted on Twilio Functions.

Assets

The Asset object allows developers to load and reference files stored in Twilio Assets. This is ideal for configuration data or minified libraries.

Asset Properties

Property Type Description
path String String specifying the location of the Asset

        
        
        
        
        Example of how to get the file path for an Asset

        Retrieve the path of an Asset

        Example of how to get the file path for an Asset
              
              
              
              
              Example of how to load a third party library stored in an Asset

              Load a module from an Asset

              Example of how to load a third party library stored in an Asset
                    
                    
                    
                    
                    Example of how to read the contents of an Asset

                    Read the contents of an Asset

                    Example of how to read the contents of an Asset

                    Functions

                    The Function object enables developers to compose complex applications by allowing them to include and execute code stored in multiple Functions.

                    Property Type Description
                    path String String specifying the location of the Function
                          
                          
                          
                          
                          Example of how to retrieve the file path for a Function

                          Retrieve the path for a Function

                          Example of how to retrieve the file path for a Function
                                
                                
                                
                                
                                Example of how to include code from other Functions

                                Include code from a Function

                                Example of how to include code from other Functions
                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.