'Configure Webhook URL From php

I am trying to use php on my website to be able to dynamically buy and set up new phone numbers as well as release them. I have had no problems finding documentation on buying new phones through php, or releasing them, however I can not find a way to set the webhooks. I need a way to set the messaging webhook from my website otherwise it does me no good. Hopefully you can help.



Solution 1:[1]

         $this->client->incomingPhoneNumbers->create([
            'phoneNumber' => $twilioPhoneNumber,
            "smsUrl" => "abc.com/api/twilio_webhook",
          ]);

while you are buying a number with 'smsUrl' parameter you can set your webhook URL programmatically

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 shafeeque ahmad