Skip to main content
Version: 8.1

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

TypeParameterDescription
StringaccountNameThe 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

Keywords

system twilio getPhoneNumbersDataset, twilio.getPhoneNumbersDataset