Twilio Functions & Assets is a serverless environment to empower developers like you to quickly and easily create production-grade, event-driven applications that scale with your business. Assets can be used to upload and host static files that support web, voice, and messaging applications.
The new Serverless API lets you deploy Twilio Functions & Assets.
- Functions and Assets created by the API are not reflected in the console UI for those products. You cannot read Functions/Assets created via the console UX via the API. The two systems are separate. See this overview of the differences.
- The API is not integrated elsewhere in Twilio. Examples:
- To set a Function created by this API to execute against a phone number, you must set the voice/sms webhook to the full Function path, not try and select it in the Functions drop down on the phone numbers page.
- To use it in a Studio flow, you'll need to use the HTTP Request widget, not the Functions widget.
- There is no GET of Function Versions or Asset Versions - you cannot retrieve file content itself via the API at this time.
- An account can have 10 services.
- A service can have up to 25 environments.
- A build can contain up to 50 Function versions.
- A build can contain up to 1000 public/protected asset versions.
- A build can contain up to 50 private asset versions.
- An account can do up to 100 builds per hour.
- Builds without an active deployment are deleted after 1 hour.
- Function execution time is limited to 10 seconds.
If you would like to start deploying Functions & Assets right away, we suggest you look into the Serverless Toolkit, which gives you an installable development environment from which to build and deploy everything you need.
To start playing with the API itself, head over to our Quickstart.
The API consists of the following resources:
The animation below shows the relationship and purpose for each resource.
With the new API, we're giving you more control over the domains you serve your Functions and Assets from once deployed. Your domain structure looks like this:
https://[service unique name]-[random characters]-[optional domain suffix].twil.io/
https://thanos-3432.twil.io/ //Environment DomainSuffix left blank https://thanos-3432-dev.twil.io/ //Environment DomainSuffix=dev https://thanos-3432-test.twil.io/ //Environment DomainSuffix=test https://thanos-3432-stage.twil.io/ //Environment DomainSuffix=stage
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。