twiliotwilio-apitwilio-twimltwilio-click-to-call

Twilio Voice calls using sub account


I have more than 10 subaccounts in twilio. On average a subaccount has 2 phone numbers. Now I'm trying to add voice call function. According to the documentation, I have to create Twiml applications and Mobile Push Credentials (to receive calls) and configure each phone number with server urls (https://github.com/twilio/voice-quickstart-android/blob/d7d4f0658e145eb94ab8f5e34f6fd17314e7ab17/README.md)

My questions are,

  1. Should I create one twiml application per subaccount ?
  2. Should I create one Mobile Push Credentials per subaccount?

Solution

  • Twilio developer evangelist here.

    You will indeed need a TwiML application per subaccount. That way you can validate the requests made to each endpoint using the auth token from that subaccount. Also, it would allow you to handle individual subaccount call flows independently.

    You will also need to create the mobile push credentials per subaccount. Subaccounts can't use cross subaccount resources.

    If you do want all your numbers to share resources like TwiML applications and push credentials then you should move all of the numbers from subaccounts to the main account.