Tby Twilio
Check a verification code
Checks the code a user entered against their pending verification and returns its status, approved when the code is right.
Description
Pass `--service-sid`, the same `--to` the code was sent to, and `--code`. A verification expires after 10 minutes and is deleted once it is approved or runs out of attempts; checking it after that returns 404. The REST call is `POST https://verify.twilio.com/v2/Services/{ServiceSid}/VerificationCheck`. The CLI also needs `TWILIO_ACCOUNT_SID` and `TWILIO_API_SECRET`, or a `twilio login` profile.
check-verification-code.md
Check a verification code
Checks the code a user entered against their pending verification and returns its status, approved when the code is right.
Pass --service-sid, the same --to the code was sent to, and --code. A
verification expires after 10 minutes and is deleted once it is approved or
runs out of attempts; checking it after that returns 404. The REST call is
POST https://verify.twilio.com/v2/Services/{ServiceSid}/VerificationCheck.
The CLI also needs TWILIO_ACCOUNT_SID and TWILIO_API_SECRET, or a
twilio login profile.
Set up
Use the first option your agent supports.
CLI (official)
Install the command, then confirm it runs.
brew tap twilio/brew && brew install twilio
twilio --version
Run twilio api:verify:v2:services:verification-check:create.
Set $TWILIO_API_KEY in your environment first (get a key: https://www.twilio.com/docs/iam/api-keys/keys-in-console).
Before doing anything else, make one read-only call to confirm access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
Built from these files in the repository
The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.
Ways in
| Route | Source | Call | Required | Docs |
|---|---|---|---|---|
| Official | twilio api:verify:v2:services:verification-check:create | API key in $TWILIO_API_KEY | Docs |