Reputation: 1
We created a function and now We want to apply this to all our active numbers but I couldn't find a way to change this in mass yet.
Is this posible ?
Upvotes: 0
Views: 50
Reputation: 3841
There are multiple options:
You can create a messaging service, configure the webhook there, and then add all your senders to it.
You could use the API or Twilio CLI to write a script that fetches all active numbers and assigns the Function URL to them.
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json \
--data-urlencode "VoiceUrl=http://functionURL.com/twilio" \
--data-urlencode "BundleSid=BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Upvotes: 0