Fetching data from Twilio REST API using Twilio Connector in Bold BI
Twilio provides a REST API that allows users to fetch data from their Twilio accounts. This includes account details, call details, and recording details.
Fetching Account Details
To fetch all account details, the following API is used:
https://api.twilio.com/2010-04-01/Accounts.json
Executing this API will return a list of account IDs associated with the Twilio account.
Fetching Call Details
To fetch call details, the following API is used:
https://api.twilio.com/2010-04-01/Accounts/<:TWILIO_ACCOUNT_SID>/Calls.json
This API requires the account ID, which can be obtained from the list of account IDs fetched earlier. This API will return the details of all calls associated with the account.
Fetching Recording Details
To fetch recording details, the following API is used:
https://api.twilio.com/2010-04-01/Accounts/<:TWILIO_ACCOUNT_SID>/Recordings.json
Similar to the call details API, this API also requires the account ID. The API will return all recording details associated with the account. The recording details include a URI field, which contains a link to download the recording.
Authentication
Twilio REST API uses basic authentication. The Account SID is used as the username and the Auth Token is used as the password. Both of these can be found on the dashboard page of your Twilio account.
There are no other dependencies to fetch data from Twilio using the REST API.