-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I delete a number? #1
Comments
Yes you can, the endpoint is documented here: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#instance-delete |
You should be able to do that using:
For example (not tested live, but something like this should work):
|
Thank you both for responding but I have tried that endpoint as follows and it doesn't work, it tells me method not supportd. Here is my code: $url = '/' . $this->api_version . '/Accounts/' . $this->account_sid . '/IncomingPhoneNumbers.json'; $data = array( return $this->_twilio->request($url, 'DELETE', $data); |
Delete is not supported on your URL: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#list-delete You need to call it specifying the incoming phone number's SID in the url: https://www.twilio.com/docs/api/rest/incoming-phone-numbers#instance My code should work to retrieve this info if you only know the phone number you want to delete, but it does require two api calls to do the work. |
Hi, using this library, is it possible to delete an existing Twilio number?
The text was updated successfully, but these errors were encountered: