Twilio phone call-in setup
Set up a Twilio phone number and backend for the experimental VDO.Ninja Twilio call-in adapter.
This guide is for advanced users or operators testing the experimental Twilio call-in adapter. It assumes there is a compatible backend service, such as a Cloudflare Worker, that can mint Twilio Voice SDK tokens and answer Twilio webhooks.
Do not put Twilio account secrets in a VDO.Ninja URL, a public web page, or GitHub. Twilio Account Auth Tokens and API key secrets belong on the backend only.
Twilio is different from the generic SIP/PBX option. Twilio's browser path uses the Twilio Voice JavaScript SDK and short-lived Access Tokens generated by a backend. Twilio does not work as a simple wss:// SIP-over-WebSockets account for the current VDO.Ninja SIP panel.
Last reviewed: July 9, 2026.
What this creates
The call path is:
The VDO.Ninja director opens a URL with
&callin=twilio.The director panel asks the backend for a browser calling token and PIN.
Twilio registers the browser as a Voice SDK client.
A phone caller dials the Twilio number.
Twilio sends the call to the backend webhook.
The caller enters the PIN.
Twilio connects the phone call to the registered browser.
VDO.Ninja mixes the caller into the room and sends a return mix back to the caller.

Cost notes
Twilio charges for phone numbers and PSTN minutes. Check Twilio's current pricing before leaving a number active.
At the time this guide was tested, Twilio's account-specific pricing API reported these Canada rates for this account:
Canadian local number rental
1.15 USD/month
Canadian local inbound voice
0.0085 USD/minute
Prices can change, and other countries or number types may cost more.
Useful Twilio references:
1. Create or find Twilio credentials
In the Twilio Console, collect these values:
Account SID
Backend token generation and Twilio REST API calls
Account Auth Token
Backend webhook signature validation
API Key SID
Backend token generation and optional Twilio REST API calls
API Key Secret
Backend token generation and optional Twilio REST API calls
The Account SID and Auth Token are shown in the Twilio Console's Account Info area. API keys are managed in the API keys section of the Console.
Save the API Key Secret when Twilio shows it. Twilio will not show it again.
2. Create a TwiML App
In the Twilio Console:
Open Voice.
Open TwiML Apps.
Create a new TwiML App.
Set the Voice request URL to your backend route:
Set the method to
POST.Save the app.
Keep the TwiML App SID. It starts with AP.
3. Buy a phone number
In the Twilio Console:
Open Phone Numbers.
Choose Buy a number.
Select the country.
Filter for Voice capability.
For a local number, optionally filter by area code or locality.
Buy the number.
Open the number's configuration page.
Under voice handling, choose the TwiML App created above.
Save the number.
For Toronto-area testing, area codes such as 647 or 437 may have better availability than 416.
4. Backend configuration
A compatible backend needs the following server-side configuration:
TWILIO_ACCOUNT_SID
Account SID
TWILIO_AUTH_TOKEN
Webhook signature validation
TWILIO_API_KEY_SID
Voice SDK token issuer
TWILIO_API_KEY_SECRET
Voice SDK token signing secret
TWILIO_APP_SID
TwiML App SID
PUBLIC_DIAL_NUMBER
Phone number shown to the VDO.Ninja director
TOKEN_API_KEY
Optional access key protecting the backend token endpoint
The backend should validate X-Twilio-Signature on Twilio webhook routes. It should also keep PINs short-lived and rate-limit bad attempts.
For BYO Twilio, the safest model is still server-side token minting. A user can run their own compatible backend, or a hosted VDO.Ninja backend can accept credentials only if that flow is designed carefully. Pasting a Twilio API Key Secret into browser-side code is not recommended.
5. Start VDO.Ninja
Use a director link with the experimental Twilio adapter:
If the backend requires a token endpoint access key, enter it in the panel. Do not place the access key in a shared guest URL.
Click Start. The panel should show a phone number and PIN:
Give that number and PIN to the caller.
If the backend advertises outbound dialing support, the Outbound test number field can place a test call. Use E.164 format, such as +15551234567. This should stay restricted by the backend; do not offer unrestricted outbound dialing from a public Worker.
If the backend does not advertise outbound support, the Dial button remains unavailable for Twilio mode. Inbound PIN calling can still work.
REST API alternative
The same Twilio setup can be automated with the REST API. Use placeholders only; do not paste real secrets into public documentation.
Search for available Canadian local voice numbers:
Update a TwiML App's voice URL:
Buy a specific number and attach it to the TwiML App:
Test checklist
Before using this live:
Start the VDO.Ninja director page with
&callin=twilio.Confirm the panel shows a phone number and PIN.
Call the number from a regular phone.
Enter the PIN.
Confirm the browser rings or auto-answers.
Confirm the VDO.Ninja guest hears the phone caller.
Confirm the phone caller hears the host and VDO.Ninja guest.
Confirm the phone caller does not hear a delayed copy of themselves.
Hang up and confirm the panel cleans up the call state.
Troubleshooting
VDO.Ninja says the token endpoint is not configured
Backend secrets are missing or the wrong backend URL was entered.
Twilio says the application URL failed
The TwiML App voice URL is wrong, unreachable, or not using HTTPS.
Calls never reach the browser
The number is not attached to the TwiML App, the PIN expired, or the browser token was not registered.
Webhook requests fail with 403
The backend is rejecting Twilio signatures; check the Auth Token and public webhook URL.
Caller hears echo
The return mix includes the phone caller audio. Check the VDO.Ninja call-in mix or external mixer routing.
When testing is finished, release unused Twilio numbers so monthly rental charges stop.
Last updated
Was this helpful?