/ Docs

Twilio

Last updated November 4, 2025 · View as Markdown

Image 1 of 1 Twilio is a web-based customer engagement platform that allows software developers to semi-automatically build business communication processes that lets you make, take, and modify calls from any device; seamlessly embed PSTN, SIP, or VoIP calling into any app, site, or other services. It also automates user verification and marketing campaign monitoring using its web service APIs.

Relyance AI provides two (2) options to integrate with a tenant’s Twilio account.

  1. The first option uses an Account SID and Auth Token.
  2. The second option uses an API Key and API Secret.

Option 1 - Create an Account SID and Auth Token


In order to integrate Twilio with Relyance AI you will need an Account SID and Auth Token.

In Twilio:

Twilio-5.png

  1. Login to your Twilio account.
  2. Find the Auth Token in the Account Info pane of the Console Dashboard page.

Twilio-1.png

  1. Copy the Account SID and Auth Token to enter in the Relyance app.

In the Relyance AI application:

Screenshot

Screenshot Screenshot Screenshot Screenshot Screenshot

The Authentication step asks for:

  • Using Custom
    • Account SID: required; held as a secret.
    • Auth Token: required; held as a secret.
  • Using API Key
    • API Key: required; held as a secret.
    • API Secret: required; held as a secret.

Option 2 - Create an API Key and API Secret


In order to integrate Twilio with Relyance AI you will need an API Key and API Secret.

Important limitation: When using an API key you can only integrate with the account that the API Key belongs to. For a more exhaustive integration, use an Auth token.

To further restrict access, you can use a restricted Twilio API key (BETA) described here

. You will need to enable '

List

' access for the following permissions:

  • Voice.Calls.calls
  • Voice.Recordings.recordings
  • Voice.outgoing-caller-ids
  • Iam.accounts
  • Messaging.messages
  • Phone-numbers.active-numbers

Note that the Address endpoint cannot be accessed using a restricted API key.

In Twilio:

In the Relyance AI application:

If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

  1. A feature you enabled returns nothing. Some scopes belong to a feature rather than to the connection: Data subject requests needs Default. Turning the feature on after the connection exists does not widen the grant it already holds, so re-authenticate the connection.
  2. A credential rotated at the vendor is not picked up here. Account SID, Auth Token, API Key and 1 more are stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.

Manage this integration with Terraform

Connections for this integration can be managed as code with the Relyance Terraform provider. Non-secret fields go in auth.params; secret fields go in auth.secrets_wo, which is write-only — never stored in Terraform state. Rotate secrets by bumping auth.secrets_wo_version.

Access token

resource "relyance_integration_connection" "twilio_0" {
  vendor = "twilio"
  name   = "<your connection name>"

  auth = {
    method = "access-token"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      SID = var.twilio_sid
      AUTH_TOKEN = var.twilio_auth_token
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}

API key

resource "relyance_integration_connection" "twilio_1" {
  vendor = "twilio"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      API_KEY = var.twilio_api_key
      API_SECRET = var.twilio_api_secret
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}