system.twilio.getPhoneNumbersDataset
This function is used in Python Scripting.
Descriptionβ
Returns a list of outgoing phone numbers for a Twilio account as a single-column Dataset. Note that these numbers are supplied by Twilio, and are not defined on a user in Ignition.
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.twilio.getPhoneNumbersDataset(accountName)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | accountName | The Twilio account for which to retrieve phone numbers. |
Returnsβ
Dataset - A list of phone numbers for the given Twilio account as a single-column Dataset
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Code Snippet
# Retrieves a list of phone numbers associated with a Twilio account and then passes the resulting list to a Table component's Data property.
# Checks against a Twilio profile configured on the Gateway by the name of "Twilio Account".
# Call system.twilio.getPhoneNumbers() and store the returned list into a variable.
twilioNumbers = system.twilio.getPhoneNumbersDataset("Twilio Account")
# Pass the dataset to a Table component. The Table is located in the same container as the
# component calling this script.
event.source.parent.getComponent('Table').data = twilioNumbers