Skip to content
Latchkey

Twilio error 21608 unverified number (trial account) in CI

Twilio returns error 21608 "The number ... is unverified. Trial accounts cannot send messages to unverified numbers" when a trial (unupgraded) account tries to alert a recipient that is not on its Verified Caller IDs list. Upgrading the account or verifying the number resolves it.

What this error means

A Twilio message from a trial account fails with error 21608 naming the unverified recipient. Verified numbers still receive the alert.

Twilio API
< HTTP/1.1 400 Bad Request
{"code": 21608, "message": "The number +15558675310 is unverified. Trial accounts cannot send messages to unverified numbers; verify +15558675310 at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers.", "status": 400}

Common causes

The account is still a trial

Trial accounts restrict outbound messages to verified caller IDs, so any other recipient is blocked.

The recipient is not a Verified Caller ID

A new on-call number was never added to the trial account Verified Caller IDs list.

How to fix it

Verify the recipient or upgrade

  1. For quick testing, add the recipient under Verified Caller IDs in the Twilio console.
  2. For production alerting, upgrade the account so any number can be messaged.
  3. Re-run the notify step once the recipient is allowed.
Twilio
# Console -> Phone Numbers -> Verified Caller IDs -> add + confirm

Use a purchased Twilio number as From

Upgraded accounts send from a purchased number to any valid recipient without verification.

Terminal
--data-urlencode "From=$TWILIO_FROM"  # a purchased Twilio number

How to prevent it

  • Upgrade the Twilio account before relying on SMS for CI alerts.
  • Keep the on-call recipient list current.
  • Do not depend on trial verification for production paging.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →