Skip to main content
Check whether an OTP code is correct, unexpired, and unused using the Laravel SDK. Use this after the user submits the code they received via WhatsApp.

Parameters

Validate the code

Common failure reasons

  • Code does not match the active OTP
  • Code expired based on expires value
  • Code already used (single-use)
  • No active OTP found for the chatId
Implement rate limits on validation attempts (e.g., max 3-5 tries) to block brute-force guessing.

Next

For passwordless login flows, try Generate OTP Link to avoid manual code entry.