Skip to main content

SMS Setup

Overview

The SMS channel connects Anyy to Twilio SMS. Incoming messages arrive through a Twilio webhook, and Anyy sends replies through Twilio's Messages API.

SMS is a direct-message channel. It does not support groups, threads, or media in the current adapter.

Prerequisites

  • A Twilio account SID.
  • A Twilio auth token.
  • A Twilio sender number.
  • A public webhook endpoint that can reach the Anyy gateway.

Setup

Create credentials

Create or reuse a Twilio Messaging number. Configure Twilio to send inbound SMS webhooks to Anyy's SMS webhook path:

/channels/sms/twilio

Configure Anyy

anyy setup channels sms \
--set account_sid=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--set from_number='+15551234567' \
--secret auth_token='twilio-auth-token' \
--write-config

Setup defaults:

FieldDefault
account_idtwilio
webhook_path/channels/sms/twilio
dm_policyopen
send_chunk_chars1500

Start Gateway

anyy gateway start
anyy channels reload

Expose the gateway webhook endpoint through your normal HTTPS ingress. The adapter registers the path, but Anyy does not provision public DNS or TLS.

Run doctor checks

anyy channels doctor sms

Access Policy

Direct messages

Use dm_policy: allowlist and E.164 phone numbers in allow_from for a private assistant:

channels:
sms:
dm_policy: allowlist
allow_from:
- "+15557654321"

Groups

SMS group messaging is not implemented by this adapter.

Admins

SMS admission policy is separate from messaging command authorization.

Sessions

Each accepted phone number maps to an Anyy session.

Media Support

Inbound media

SMS does not advertise inbound media support.

Outbound media

SMS sends text replies only.

Commands

Send shared messaging commands as plain SMS text. Keep messages short because SMS delivery can split long replies.

Cron Delivery

anyy cron create \
--name "SMS reminder" \
--schedule "30m" \
--prompt "Remind me to leave" \
--delivery-target current_user_default \
--delivery-channel sms

Troubleshooting

  • Webhook not called: check the public URL configured in Twilio.
  • Replies fail: check account_sid, auth_token_ref, and from_number.
  • Unexpected sender: switch to dm_policy: allowlist.
  • Long replies look split: lower send_chunk_chars if your carrier handles long messages poorly.