如何将Twilio中的新子帐户链接到Application SMS URL

I am working on a portal where each new customer gets a twilio sub account and a phone number linked to it, when he creates his account on the portal.

Now I want to link all these new phone numbers in the new sub accounts to a TwiML application in the parent Account, so that the new numbers are able to use the TwiML Application's Voice and SMS URLs.

I have studied the Twilio Documentation and was not able to figure out a way to get this done.

Language: php

Twilio Developer Evangelist here!

TwiML Applications are scoped to each sub account, so you actually cannot assign a sub account's phone number to use the Voice and SMS URLs associated with a TwiML Application not directly owned by that sub account.

However, you can create new TwiML Applications via the REST API so as part of your setup process where you create the sub account, you could also create a new TwiML Application that is owned by that sub account and assign the numbers to it as you purchase them.