Bird vs Twilio
Bird 与 Twilio 的 Verify 对比
Bird Verify 将渠道路由和验证码校验绑定在收件人上:发送验证码、推进投递计划、使用同一邮箱地址或手机号核验答案。
每天都被构建
世界级软件的团队所信赖。
哪种验证流程适合你的应用?
Twilio Verify 适用的场景
Twilio 的验证资源 除 SMS、WhatsApp 和邮件外,还支持电话和静默网络认证。如果你依赖语音或 SNA 通道,可继续使用支持该通道的服务商;Bird 的已解析渠道计划支持 SMS、WhatsApp、邮件和 Telegram。
Twilio Services 将验证配置(包括验证码长度和友好名称)分组管理。创建请求 还接受模板、语言区域和自定义验证码。迁移到 Bird 的工作区设置和内置消息前,先清点这些选项。
Twilio 的 SMS riskCheck 可按请求启用或跳过主动欺诈防护,包括 Fraud Guard 和 Geo Permissions。迁移时应保留应用的风险决策,而非将 Bird 的重发和校验次数限制视为等效控制。
为什么选择 Bird Verify?
Bird 根据收件人和国家解析投递方式。请求可通过 options.channels 裁剪或重排可用计划,投递失败时可自动推进到下一渠道。同一收件人标识用于校验和下一渠道请求。
Bird 的校验结果返回 success、reason 和 attempts_remaining。使用 success: true 记录应用的已验证状态;HTTP 200 也可能携带验证码错误的结果。
Bird 的托管 MCP 服务器和 CLI 执行相同的 Verify 流程:创建、校验和下一渠道。代理可使用应用已持有的收件人请求另一投递渠道。
对比矩阵
两者的 Verify API 对比如何?
对比应用使用的请求和生命周期控制。渠道可用性取决于收件人所在国家和账户已启用的能力。
| 功能 | Bird | Twilio Verify | 谁更胜一筹? |
|---|---|---|---|
| 创建请求 | 使用 Bearer 密钥 JSON 向 /v1/verify/verifications 发送请求;to 包含邮箱地址、手机号或两者。 | 表单编码创建请求,在 Service SID 下指定收件人和渠道。 | |
| 安全重试 | Idempotency-Key 可重放请求。收件人重发复用当前验证,遵守冷却时间,之后签发新验证码。 | Twilio 在有效期内保持同一 token,直到验证成功,包括收到新请求时。 | |
| 失败验证告知您什么 | success: false,reason 例如 incorrect_code,以及 attempts_remaining。存储 success: true;已完成的验证在再次校验时返回 404。 | Verification Check 返回 status,包括 pending、approved 和 max_attempts_reached。已通过、已过期和已达上限的验证会被删除;后续校验返回 404。 | |
| 验证码可送达的渠道 | SMS、WhatsApp、邮件和 Telegram,限于收件人所在国家的已解析计划。 | SMS、邮件、WhatsApp 和电话,同一资源还提供 sna 和 auto 用于静默认证流程。 | |
| 按请求配置 | options.code_length、options.channels 和 options.language;发送方和默认设置来自工作区配置。 | Service 选择加请求选项,可指定模板、语言区域、自定义验证码和友好名称。 | |
| 托管 MCP 服务器 | 经认证的托管 MCP 运行创建、校验和下一渠道操作;bird CLI 提供相同的操作。 | Twilio 的托管文档 MCP 搜索和检索文档,不执行 API 调用。Twilio Labs 的 MCP 概念验证 加载选定的 API 服务;Twilio CLI 发起 API 请求。 | |
| 投递事件 | 工作区 webhook 上的会话和尝试事件,使用 Standard Webhooks 签名。投递和验证码使用成功是独立事件。 | Verify Events 处于 Pilot 阶段,支持自助开通。它将 SMS、WhatsApp、RCS 和 Voice 的验证及消息状态流式推送到 webhook 或 Amazon Kinesis。 | |
| 渠道降级 | 投递失败会推进已解析计划。下一渠道操作允许应用主动推进并发送新验证码;先前的验证码仍然有效。 | 自动 SMS 回退 先尝试 SNA,失败后回退到 SMS。Twilio 将其标记为 Pilot,需联系销售才能使用。 |
谁推进回退,哪个验证码仍然有效?
Bird 在投递失败时推进收件人的已解析计划。你的应用也可以在用户反馈未收到验证码时调用 next-channel。每次调用最多推进一个渠道并发送新验证码;该验证的所有先前验证码仍然有效。
Bird:使用 to 创建 → 已解析计划 → 投递失败或 next-channel → 新验证码 → 使用相同 to 校验。计划用尽时返回 NoNextChannel。在提供再次发送前,先保存已完成的成功结果。
Twilio:使用 Service SID 和 channel: auto 创建 → SNA 尝试 → 需要时回退到 SMS → Verification Check。自动渠道指南 描述了这一特定的 SNA 到 SMS 流程,并标记访问权限为 Pilot。Twilio 的 token 在有效期内保持不变,直到验证成功。
校验后你的应用应存储什么?
存储成功的认证结果。Bird 通过精确的 to 集合标识验证:如果创建时使用了手机号和邮箱,校验时需同时提供两者。success: false 且 reason: incorrect_code 的响应即使 HTTP 200 也表示校验失败。之后的 404 E13000 不能撤销先前的 success: true。
Twilio 也接受收件人进行校验,或在 Service SID 下使用 Verification SID。将 status: approved 作为成功结果。其 valid 布尔值是遗留属性;参考文档建议集成方使用 status。
迁移时需要保留哪些滥用控制?
Bird 的滥用防护包括重发冷却时间、收件人发送上限和校验频率限制。请求下一渠道会跳过重发冷却和每小时发送上限,但有限的渠道计划约束了推进次数。在这些操作外围保留你自己的账户和会话风险控制。
Twilio 的 SMS riskCheck 可按请求启用或跳过 Fraud Guard 和 Geo Permissions。需明确映射这些设置及其运营决策;投递重试限制不等同于欺诈检测。
验证和发送如何计费?
There's no plan, seat, or platform fee for Bird Verify. Each delivery is charged at that channel's rate for the destination. A resend, or a fallback that moves delivery to a second channel, is a new send and a new charge.
A verdict compares only published delivery rates with the same channel, destination, currency, billing unit and sender type. Per-success verification fees and per-send charges are Not comparable: your own sends and successful checks determine usage.
Pricing verdict: Not comparable
| 已发布项目 | Twilio Verify | Bird 计费政策 |
|---|---|---|
| Base pricing Per successful verification | $0.05 USD Per successful verification plus standard channel fees. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 |
| SMS (US) Per SMS Destination: US | $0.0083 USD Per SMS (US). The successful-verification fee is charged separately. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 |
| WhatsApp (US) Per authentication template message Destination: US | $0.0034 USD Per authentication template message (US). The successful-verification fee is charged separately. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 |
| Voice Per successful verification | $0.05 USD Per successful verification. Voice channel pricing applies separately. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 This method is outside Bird’s documented Verify channel plan. |
| Email Per successful verification | $0.05 USD Per successful verification. Email channel pricing applies separately. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 |
| Silent Network Auth Per successful verification | $0.05 USD Per successful verification plus per-country channel fee. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 This method is outside Bird’s documented Verify channel plan. |
| Push Per approved or denied request | Push channel fee is included in the verification fee. It’s charged when a request is approved or denied. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 This method is outside Bird’s documented Verify channel plan. |
| TOTP Per approved request | TOTP channel fee is included in the verification fee. It’s charged when a request is approved. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 This method is outside Bird’s documented Verify channel plan. |
| Volume pricing Custom volume | Contact sales Contact sales for volume-based discounts. as published | There's no plan, seat, or platform fee for Bird Verify. 通道发送单独计费。请查看以下实时通道费率。 |
Bird 已发布的 SMS 通道费率
Bird's SMS catalogue rates are shown by sender type, per message segment. Carrier fees and sender costs may apply separately. These channel rates are not a total verification quote. SMS pricing; carrier fees.
| 目的地 | 发送方类型 | 每个 SMS 分段 |
|---|---|---|
| US | long_code | EUR 0.003 |
| US | long_code | USD 0.0035 |
| US | toll_free | EUR 0.003 |
| US | toll_free | USD 0.0035 |
| US | short_code | EUR 0.006 |
| US | short_code | USD 0.007 |
Bird email pricing and Bird WhatsApp pricing publish the other delivery channels.
同一个验证
如何发起一次验证?
Twilio 的 Node SDK 在 Service 下创建验证。Bird 的创建端点直接接受收件人。对同一 Bird 请求的重试,复用应用的幂等键。
Twilio Verify
import twilio from "twilio";
const client = twilio(process.env.TWILIO_ACCOUNT_SID!, process.env.TWILIO_AUTH_TOKEN!);
try {
const verification = await client.verify.v2
.services(process.env.TWILIO_VERIFY_SERVICE_SID!)
.verifications.create({
to: "+15551234567",
channel: "sms",
});
console.log(verification.sid, verification.status);
} catch (err) {
console.error(err);
}
Bird
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({ apiKey: process.env.BIRD_API_KEY! });
const { data, error } = await bird.verify.verifications
.create(
{
to: { phone_number: "+15551234567" },
options: { code_length: 6, channels: ["sms"] },
},
)
.safe();
if (error) console.error(error.message);
else console.log(data.id, data.status);
迁移成本
切换前需要做哪些调整?
逐一盘点每个 Service 的通道、模板、风控规则和恢复路径。参照 Twilio 迁移指南,映射支持的接收方和配置。对于 Bird 合同未涵盖的呼叫、SNA 或自定义消息路径,保留或重新设计替代方案。
先将新创建的验证切换到新提供商,然后将每次校验请求路由到签发其验证码的提供商,直到未完成的验证过期。保留成功的应用结果,并测试重发、下一通道、验证码过期和尝试次数耗尽的行为。Bird 的发送方指南展示了用户收到的身份和消息。
选择前应检查哪些事项?
Bird 能替代 Twilio Verify 用于 SMS 和邮件验证吗?
Twilio 的第二次请求会生成不同的验证码吗?
能否迁移所有 Twilio 模板和语言区域设置?
404 是否意味着用户验证失败?
下一步
建议从迁移指南开始:它逐字段映射了 API。
将验证融入你的产品。
与我们的团队沟通你的渠道、验证流程和预期流量。