Verify migreren vanuit Twilio
Deze pagina vertaalt Twilio Verify v2 naar Bird Verify. Volg de hoofdmigratiegids op volgorde en gebruik deze vertalingen voor stap 1 en 3.
De Service is het onderdeel zonder tegenhanger. Twilio adresseert POST https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications, en de Service bevat codelengte, TTL, lookup, vastelijnaanpak en rate limits. Bird adresseert POST /v1/verify/verifications zonder servicesegment: die instellingen horen bij je werkruimte in plaats van een ID in het pad. Meerdere Service-ID's hebben geen equivalent binnen een werkruimte, en je kunt geen configuratie per verzoek kiezen.
Geef dit aan je agent
Plak dit in Claude Code, Cursor of Codex. De agent werkt deze pagina door tegen je eigen repository, met welk Bird-oppervlak die al heeft: de MCP-server als er een verbonden is, de CLI als die geïnstalleerd en ingelogd is.
Codevoorbeeld
I am moving a phone verification integration from Twilio Verify to Bird Verify. Route through it with me.
1. Check what you already have before setting anything up. If Bird's MCP server is connected, use its tools. If the Bird CLI is installed and signed in, use that. Either one is enough, and every step below is an action you take with whichever you have. Only if neither is present, follow https://bird.com/docs/ai/set-up-your-agent.md to set one up and sign me in. Every Bird docs page serves Markdown at its own URL with `.md` appended, so fetch that rather than the HTML.
2. Read https://bird.com/docs/guides/verify/migrate/twilio.md for the create, check and status mapping, and https://bird.com/docs/guides/verify/migrate.md for the order the steps go in.
3. Find and list my Twilio Verify usage in this repository before you change anything: the Verifications and VerificationCheck call sites, every Service SID they name and what each Service is configured with, and any place I read a verification status. Bird has no Service segment and no per-request configuration selection, so tell me if I use more than one Service and what differs between them.
4. Tell me early which of these I depend on. Bird Verify has no voice channel and no silent or network-based authentication. It generates the code itself and never returns it, so I cannot supply my own. It accepts `options.language` but no per-request template or message body. Bird can use an existing SMS Sender ID or a connected WhatsApp number with an approved authentication template, configured per channel or country rather than per request; tell me whether my current sender can be kept. Twilio's Service holds code length, TTL, lookup, landline handling and rate limits; on Bird those belong to the workspace rather than to an ID in the path, so tell me which of my Service settings have no home.
5. Configure my channels and destinations following https://bird.com/docs/guides/verify/countries.md and https://bird.com/docs/guides/verify/senders.md. While you are there, disable every country I do not actually verify into. An enabled destination I never send to is not reach, it is exposure to SMS pumping, so ask me which countries I serve rather than leaving the defaults.
6. Port the create and check calls using the mapping tables on the provider page, and move my status handling to Bird's events: https://bird.com/docs/guides/verify/sending-verifications.md and https://bird.com/docs/guides/verify/events.md.
7. Cut over at the create call, not all at once, because a code issued by Twilio Verify cannot be checked by Bird and a code issued by Bird cannot be checked by Twilio Verify. From the moment I say go, send every NEW verification to Bird, and keep routing each check to whichever provider issued that verification. Keep both paths live for one full code lifetime plus margin, then retire the old one. Tell me how you will decide which provider issued a given verification before you write any of it.
8. Test before any real traffic. Bird Verify has no simulated recipients, so do not look for a sandbox: the thing worth testing is the code arriving. Run the integration against a phone number and a mailbox I control, on each channel I enabled, and show me what arrived on each one.
9. Stop and ask me wherever a step needs a decision. Do not start routing new verifications to Bird until I have seen those test results and replied with the words cut over to Bird. Retiring the Twilio Verify path is a separate step: ask me again and wait for me to reply with the words retire the Twilio Verify path, and do not retire it while any code it issued could still be checked. A reply that agrees without naming what it is authorising is not authorisation. Finish by telling me what is left that only a person can do.Vertaal de create-aanroep
| Wat het doet | Twilio Verify | Bird |
|---|---|---|
| Ontvanger | To | to.phone_number of to.email |
| Kanaal | Channel | options.channels, anders de geconfigureerde volgorde van het land |
| Codelengte | Service CodeLength | options.code_length, anders de standaardwaarde van de werkruimte |
| Codelevensduur | Service TTL | de werkruimte-instelling Duration |
| Pogingslimiet | Service max attempts | de werkruimte-instelling Maximum Retries |
| Correlatie | Tags | metadata |
| Veilige retries | (geen) | Idempotency-Key-header |
| Eigen verificatiecode | CustomCode | geen equivalent |
| Lokalisatie | Locale | options.language |
| Berichtinhoud | TemplateSid, CustomFriendlyName, ChannelConfiguration | geen per-request equivalent; selecteer een goedgekeurd WhatsApp-authenticatietemplate in de Verify-configuratie |
| Per-key throttles | RateLimits | vaste platformbegrenzingen |
| Fraudecontroles | RiskCheck, Fraud Guard, DeviceIp | niet beschikbaar via de API |
| SMS autofill | AppHash | geen equivalent |
| PSD2 | Amount, Payee | geen equivalent |
De kanalen komen ook niet een-op-een overeen:
| Twilio Channel | Bird |
|---|---|
| sms | sms |
| call | geen equivalent |
| sna, auto | geen equivalent |
| rcs | geen equivalent |
| (geen) | telegram, beschikbaar voor nummers geregistreerd bij Telegram |
Een flow die call als toegankelijkheidsfallback gebruikt, of sna en auto voor een codeloos pad, moet je heroverwegen voordat je je vastlegt op een datum. Al het andere is een kanaalvolgordewijziging op de Countries-pagina in plaats van een parameter per verzoek.
Vertaal de check-aanroep
Twilio's POST /v2/Services/{ServiceSid}/VerificationCheck neemt To of VerificationSid, plus Code. Bird's POST /v1/verify/verifications/check neemt alleen de ontvanger en de code, dus het VerificationSid-pad verdwijnt samen met de kolom waarin je het opsloeg. Geef precies de adresset mee waarmee je de verificatie hebt aangemaakt.
De antwoordstructuur verschilt waar het er het meest toe doet:
- Twilio antwoordt met een status-veld; Bird antwoordt met een boolean. success: true betekent geverifieerd. success: false bevat een reason van incorrect_code, expired of attempts_exhausted, plus attempts_remaining, dus het "how many tries left"-getal dat je misschien zelf bijhoudt komt terug in het antwoord.
- Beide gaan naar 404 zodra de verificatie is opgebruikt. Twilio verwijdert de verificatie wanneer die is goedgekeurd, verlopen of door de pogingen heen is; Bird stopt met het accepteren van checks in elke definitieve status. Sla het eerste definitieve antwoord op in plaats van opnieuw te controleren.
Vertaal statussen
| Twilio-status | Bird-status | Bird-reden |
|---|---|---|
| pending | pending | geen |
| approved | verified | geen |
| max_attempts_reached | failed | attempts_exhausted |
| expired | expired | ttl_elapsed |
| canceled | geen equivalent: een verificatie kan niet worden geannuleerd |
Er is geen update-endpoint, dus het Twilio-patroon waarbij je een verificatie naar approved of canceled forceert vanuit je backend heeft geen tegenhanger. Een verificatie eindigt wanneer de gebruiker hem verifieert, de pogingen uitput of hem laat verlopen.
Verplaats de event stream
Twilio Verify rapporteert activiteit via Event Streams: een sink plus een abonnement op verificatiestatusevents, geconfigureerd buiten de Verify-API. Bird gebruikt hetzelfde webhookmechanisme als elk ander kanaal. Abonneer een endpoint op de eventtypen die je wilt, en benoem ze elk: verify.verification.created, verify.verification.verified en verify.verification.failed voor sessie-events, en verify.attempt.sent, verify.attempt.delivered en verify.attempt.undelivered voor individuele verificatiecodeleveringen. Er is geen wildcard die ze vervangt. Verifieer de handtekening volgens Standard Webhooks. Zie Verify-events.
De twee assen zijn belangrijk wanneer je dashboards migreert. Twilio's verificatiestatusevents komen overeen met de sessie-events van Bird, en de poging-events van Bird voegen per-verzending leveringsresultaten toe aan dezelfde sessie, inclusief de verzendingen die een opnieuw verzenden of een kanaalfailover oplevert.
Overschakelen
De overschakelregel in de hoofdgids is degene waar je omheen plant: een code die door Twilio is uitgegeven kan niet door Bird worden gecontroleerd, dus schakel over bij de create-aanroep en blijf checks routeren naar de provider die de verificatie heeft uitgegeven totdat de laatste Twilio-code verloopt.
Controleer de afzender vóór de cutover. Je kunt kiezen voor Bird Verify of Authifly, je geverifieerde e-maildomein gebruiken, een bestaand SMS Sender ID selecteren, of je gekoppelde WhatsApp-nummer combineren met een goedgekeurd authenticatietemplate. Bird kiest niet uit een pool van afzenders. Als je een SMS Sender ID als configuratiestandaard behoudt, valt Verify alleen terug op Bird Verify waar dat ID niet in aanmerking komt voor de bestemming; een expliciete landkeuze doet dat niet. Controleer wat gebruikers in elk land zien en werk supportscripts bij waar het verandert.
Volgende stappen
- Verificaties verzenden: het volledige contract voor beide aanroepen, statussen en limieten
- Landconfiguratie: waar kanaalvolgorde en beschikbaarheid nu staan
- Afzenders en branding: wat de ontvanger ziet op elk kanaal
- Verify-events: de events waarnaar je Event Streams-consumer overstapt
Gerelateerde bronnen
Ga verder met de documentatie, handleidingen en voorbeelden voor dit onderwerp.