Check a verification code
check_otpVerify a code sent with send_otp and consume it, so it can never be used twice. A wrong or expired code answers 400 OTP_INVALID. It is deliberately an error, not a verified: false, so a missing check at the caller can never read as success. Five wrong guesses kill the code. Free.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"to": "<to>",
"code": "<code>"
},
"name": "check_otp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient: a phone number in international format (+5511988887777) or a WhatsApp address (5511988887777@s.whatsapp.net, an @lid contact, or a @g.us group). | |
| code | Yes | The code the user typed. | |
| idempotencyKey | No | Your own unique id for this call, such as a UUID. If the call fails with no answer, call again with the same key: it runs once, and the retry gets the first answer back. Answers are kept for 24 hours. |