> ## Documentation Index
> Fetch the complete documentation index at: https://docs.p2hs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Twilio to P2HS

> Use the Twilio connector with P2HS applications and capabilities.

## Overview

Send SMS and WhatsApp messages via the Twilio Messages API.

**Category:** Communication\
**Catalog status:** available

## Supported capabilities and connector actions

| Connector action | Description |
| - | - |
| `twilio.send_sms` | Send SMS. Send an SMS or WhatsApp message via the Twilio Messages API. |

## Direction

* **P2HS → Twilio:** Yes — supported actions can send data or requests to the provider.
* **Twilio → P2HS:** Yes — the catalog declares inbound triggers.
* **Webhooks:** Event delivery is represented by the declared triggers.

## Prerequisites

* A Twilio account with permission to create or authorize the connection.
* The credentials or authorization flow required by P2HS (Api key).
* Any provider-side account, workspace, repository, store, or sending-domain permissions required for the selected capability.

## Connect the integration

1. Open the P2HS dashboard.
2. Select the project or workspace where the connector will be used.
3. Open Integrations and choose **Twilio**.
4. Select Connect and complete the provider authorization or credential form.
5. Save the connection and run the verification check.
6. Bind the connection to a compatible capability, App Block, or Feature Pack.

## Credentials and configuration

**Authentication:** Api key.

The current catalog requires these credential fields:

* `auth_token`

Configurable fields exposed by the connector:

* `account_sid`
* `from_phone`
* `messaging_service_sid`

P2HS stores connector credentials as managed secrets. Rotate or revoke them from the connection settings; do not commit them to source code or expose them in browser code.

## Generated applications

After **Twilio** is connected, compatible capabilities and composed application features can bind to the connection. The generated application should call the approved P2HS capability rather than embedding Twilio credentials.

```text theme={null}
Generated application
        ↓
P2HS capability
        ↓
Twilio connector
        ↓
External provider
```

## Events and webhooks

The catalog declares these inbound events:

* `message_received` — Inbound message received
* `message_status_updated` — Message delivery status updated

Inbound events are verified and processed by the P2HS integration contract before application state is updated.

## Troubleshooting

* **Authentication failed:** confirm the credential or authorization flow and the provider account selected.
* **Permission denied:** verify that the provider account can access the configured resource and action.
* **Action unavailable:** confirm that the capability is admitted for the project and supported by this connector.
* **Event not received:** check the connection status, provider event configuration, and the project environment.

## Disconnect or rotate credentials

Update or revoke the connection from the project or workspace Integrations settings. Dependent capabilities may stop working after disconnecting; reconnect and verify the binding before retrying the application flow.

## Related concepts

* [Integration troubleshooting](/content/support/troubleshooting/integrations)
* [Connector model](/content/integrations/connectors)
* [App features](/content/backend/overview)
* [Capabilities reference](/content/composition/capabilities)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.