Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

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.

Go to 'Request code' action ->

Configuration ​

Display KeyExample InputDescription
Email"user@example.com"Email for which the code was issued.
OTP Code"362941"Code the user entered.
OTP Typesign-inPurpose 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-password
2
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 action
4
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.

OTP Input Element ->

Notes ​