Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Twilio

This documentation for the Twilio integration describes the technical capabilities of this integration, including authorization, scopes/permissions, and utilized endpoints. For more information on how to integrate Twilio, visit our connection instructions.

Version​

This integration utilizes the Twilio Twilio REST API 2010-04-01.

Base URL​

The base URL used for all Twilio API endpoints:
https://api.twilio.com

The one exception is phone number validation, which uses the Twilio Lookup API at https://lookups.twilio.com. The full URL is shown for that endpoint below.


Authentication & Authorization​

The DataGrail Twilio integration connects using basic authentication which requires an Account SID and Auth Token.

Sensitive Credentials
Publicly exposing your API credentials can allow unauthorized access to Twilio API endpoints by a third party. DataGrail stores your API credentials encrypted and protected.

Endpoints Utilized​

DataGrail uses the following endpoints to authorize and test the connection:


Limits​

Limits in Twilio are calculated using the leaky bucket algorithm. All requests that are made after rate limits have been exceeded are throttled and an HTTP 429 Too Many Requests error is returned. Requests succeed again after enough requests have emptied out of the bucket.

  • DataGrail supports requests throttling to stay within 70-80% of specified service rate limits.
  • DataGrail processes API responses with HTTP 429 status to interrupt requests, waiting and retrying (using an exponential backoff strategy).

Capabilities​

Access​

DataGrail's Twilio integration provides Synchronous Access capabilities for the following supported identifier category: Phone Number.

Data Interactions​

For Access requests, DataGrail will take the following actions:

  1. Validate each Phone Number on the request with the Twilio Lookup API and convert it to E.164 format. DataGrail doesn't search by Email.
  2. Search for messages sent to the phone number and messages received from the phone number.
  3. For each message with attached media, collect the media records.

When reviewing data returned by Twilio please note the following:

  • Only messages and media in the connected Twilio account are searched.
  • Media records contain metadata (such as content type and URI), not the media files.

Endpoints Utilized​

Field-Level Controls​

DataGrail searches the following Twilio objects for personal data. You can choose which fields DataGrail includes in Access requests with Field Level Controls:

ObjectData IncludedAccess ControlsDeletion Controls
Sent To MessagesMessage fields such as body, from, to, status, dates, price, and error detailsPer field. sid is always includedPer object
Received From MessagesMessage fields such as body, from, to, status, dates, price, and error detailsPer field. sid is always includedPer object
Media Objectsaccount_sid, content_type, date_created, date_updated, and uriPer field. sid and parent_sid are always includedFollows the messages

Deletion​

DataGrail's Twilio integration provides Synchronous Deletion capabilities for the following supported identifier category: Phone Number.

Data Interactions​

For Deletion requests, DataGrail will take the following actions:

  1. Validate each Phone Number on the request with the Twilio Lookup API and convert it to E.164 format.
  2. Search for messages sent to and received from the phone number, and for the media attached to them.
  3. Delete each collected message by its SID.
  4. Delete each collected media file by its message SID and media SID.

Endpoints Utilized​

MethodEndpointPurposeDocs
GET/2010-04-01/Accounts/{AccountSid}/Messages.jsonList messages sent to or received from the phone number
DEL/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}.jsonDelete a message
GET/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.jsonList media attached to a message
DEL/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{MediaSid}.jsonDelete a media file
GEThttps://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}Validate and normalize the phone number to E.164 format

Deletion Dependencies​

Deletion requests support Field Level Controls at the object level. DataGrail deletes Media Objects together with the messages they belong to, so it doesn't offer a separate Deletion setting for them. The following table shows how each object is handled:

ObjectDeletion SettingDepends On
Sent To MessagesConfigurableNone
Received From MessagesConfigurableNone
Media ObjectsNot configurableSent To Messages, Received From Messages

Media Objects are deleted when either of their parent objects is enabled for deletion. If you disable both Sent To Messages and Received From Messages, DataGrail deletes no messages or media for the request. Field-level selection doesn't apply to Deletion requests, so all fields are processed.


 

Need help?
If you have any questions, please reach out to your dedicated Account Manager or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.