Appearance
OTP - Check code validity ​
Use this action to verify whether a submitted OTP (one‑time passcode) is valid for the specified purpose. This is a lightweight check that does not sign in the user, reset a password, or verify an email by itself. It’s useful when you need to branch your workflow manually after validation.
FIRST REQUEST A CODE
Before you can use this action, you must first use the Request code action to generate a code.
Configuration ​
| Display Key | Example Input | Description |
|---|---|---|
| "user@example.com" | Email for which the code was issued. | |
| OTP Code | "362941" | Code the user entered. |
| OTP Type | sign-in | Purpose for which the code was requested. Valid values: sign-in, email-verification, forget-password. Defaults to sign-in. |
Example output ​
json
{ "valid": true }Example flow ​
1
Request a code with the appropriate
OTP Type (sign-in, email-verification or forget-password2
In the
On OTP requested Event Trigger, send the code (such as via email or SMS)3
After sending the code, allow the user to enter the code and run the
OTP – Check code validity action4
Depending on if the code was valid, run whatever logic you wish
OTP INPUT ELEMENT
If you do not wish to create your own element to allow the user to input the code, WeWeb has its own native element.
Notes ​
- Use this action when you want to validate first, then run a different action based on the result (e.g., sign in or reset password).
- If you already know the target outcome, prefer using the specific action:

