Get the Twilio Phone Number SID from an active Twilio phone number

I would be very grateful if somebody could point me in the direction of the API that can be used to return a Phone Number SID ( PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ) for a given and active twilio phone number, eg, +987654321 that we own - using our account SID and token in the request as normal.
This is to help complete the steps for ISV US A2P 10DLC Starter Registration - I'm looking for something that is the opposite and similar to adding a phone number to a messaging service?
Thanks,
Tim
Answers
-
Hi! Developer Educator here.
Example 2 from the IncomingPhoneNumber resource page (https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource#read-multiple-incomingphonenumber-resources) is what you're looking for:
GET request to
https://api.twilio.com/2010-04-01/Accounts/{{account_sid}}/IncomingPhoneNumbers.json?PhoneNumber=+12345678900&PageSize=20
-
Many thanks for that, will give it a try and hopefully its what we need.
Tim.
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups