Using Twilio Functions you can quickly create a web app that allows you to export a list of your active numbers and more!
- The app is powered by Twilio Functions within your Twilio account.
- The app will allow you, and anyone on your team that you provide the app link and password, to view or export your active numbers listing from your account SID or a related subaccount.
Before creating the app on your Twilio account, you can test it on our Demo account.
Creating your Twilio powered List Numbers Function using Code Exchange Quick Deploy
Using Twilio's Quick Deploy Applications feature in Code Exchange you can create and use Twilio Function applications within minutes. Use the link below to deploy the List Active Numbers Function on your Twilio account and start exporting lists of your active numbers any time you need.
Creating your Twilio powered List Numbers Function in Console
It only takes about 10-15 minutes to set up. There is no coding required, just some copy and pasting on your part.
- You can also see more details on our blog post on how to create this and other features on your Twilio account without coding: Quickly export a list of active Twilio numbers, transfer them, and check their usage
The application will need to be added to a Function created on the Twilio Functions page.
- The function should be created on a desired Main account SID.
- You will have the option to search the logs of the subaccount in the app itself.
Open the GIT repository here for List Active Numbers. We will reference this as we create the function in Console.
- Create a new Function in Console by going to the Twilio Functions page.
- Note: If you are missing Functions & Assets in your menu bar, add it using the Explore Products option and pinning it to the menu. See: How do I modify the product links in the console?
- Open the Functions folder in the GIT repository.
- This folder will contain four files: get_account.js, list_accounts.js, list_numbers.js and mask_account.js
- In the Console add a new function (button in top left corner) and give it the same name as the file in the GIT folder (without .js at the end).
- Open the file in the GIT repository and copy the code from the file.
- Paste this code into the console function.
- Repeat this process for every Function file in the GIT folder.
- Open the Assets folder in the GIT repository.
- This folder will contain three files: ce-paste-theme.css, index.html and styles.css
- In the Console add a new Asset (button in top left corner) and name it index.html
- Open the file in the GIT repository and copy the code from the file.
- Paste this code into to the console asset.
- Do the same thing for the two .css file.
- For these assets, when you open them in the online Function, in the bottom-right corner it should say “html” and “css” respectively.
- Click on “Environmental Variables” and add a new key called “Password” with the desired value (this will be your password to use the app).
- Save all functions and assets.
- Next to the name of each you will see the current access level, set it to Public for all of them.
- By default they are Private.
- Click on “Deploy All”, and wait for the deployment to be completed.
- Click on “Dependencies” and update some items as needed.
- The twilio module version with ^3.61.0.
- If the @twilio/runtime-handler version is not at least 1.2.1, change it to 1.2.1.
- Change the Node version to 18 at the top.
- Click “Deploy All”, and wait for deployment.
- Click on index.html and in the bottom right corner click on “Copy URL”
- Paste the URL in a new browser tab.
- This will open the app that you can now use any time to get a list of your active numbers.
List Numbers Function Setup Video
Related Topics