is there any way to check if a phone number's Messaging Active Configuration is configured or not, through the API?
Thank you!
is there any way to check if a phone number's Messaging Active Configuration is configured or not, through the API?
Thank you!
Yes, you can use the IncomingPhoneNumbers resource to do so.
See the code examples (Fetch/List)
For a Messaging Service (to see if a number is in a messaging service):
https://www.twilio.com/docs/messaging/services/api
Example:
client.messaging.services
.list({limit: 20})
.then(services => services.forEach(s => console.log(s.sid)));
PhoneNumber Resource
https://www.twilio.com/docs/messaging/services/api/phonenumber-resource
Example:
client.messaging.services('MGxxx')
.phoneNumbers
.list({limit: 20})
.then(phoneNumbers => phoneNumbers.forEach(p => console.log(p.phoneNumber)));