Start Phone Verification
Start a phone number verification using the Sinch Verification API. Supports SMS (PIN code), Flashcall (missed call), or Callout (voice TTS). Uses Application Key + Secret.
IMPORTANT: Execute this command directly. Do NOT generate script files. Perform the API call immediately.
Input
--to/-t: Phone number to verify (E.164) - required--method/-m: Verification method: sms, flashcall, or callout - required (default sms)
Arguments: $ARGUMENTS
Instructions
Execute these steps directly - do not write code or scripts:
If $ARGUMENTS empty: ask for phone number and method (sms, flashcall, callout). Otherwise parse.
Validate: --to (E.164), --method (sms | flashcall | callout). Normalize method to lowercase.
Get VERIFICATION_APPLICATION_KEY and VERIFICATION_APPLICATION_SECRET from env (or shared Voice/Verification app credentials if documented). Verification API uses Application Key/Secret. If missing, report "Verification API is not configured. Set application key and secret for Verification app."
Request body: identity { type: "number", endpoint: "+E164" }, method.
POST https://verification.api.sinch.com/verification/v1/verifications with Basic Auth (application_key:application_secret), Content-Type application/json.
On success: "✅ Verification started" with verification ID. Tell user to share the code with the end user (SMS) or that Flashcall/Callout was triggered. Handle 400, 401, 429 with clear messages.
Handle all errors gracefully.
Examples
/sinch-api-verification-start --to=+14155551234 --method=sms
/sinch-api-verification-start -t +14155551234 -m callout
API Reference
- Base URL: https://verification.api.sinch.com/verification/v1
- Endpoint: POST /verifications
- Auth: Basic (application_key:application_secret)
- Documentation: https://developers.sinch.com/docs/verification/