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.

On OTP requested

You can use this event to generate a one‑time code that can then be sent to the user to allow them to verify their email, sign in, or reset their password.

Interface actions that fire the On OTP requested event

Event data

Display KeyExample ValueDescription
email"user@example.com"The target user email to receive the OTP
otp"362941"The one‑time passcode generated by WeWeb
typeemail-verificationContext for the OTP request. This matches the OTP Type you selected in OTP - Request code: sign-in, email-verification, or forget-password.

Example payload

json
{ "email": "user@example.com", "otp": "362941", "type": "email-verification" }

Sending the OTP via email

To email the newly generated code to the user, use one of the email sending integrations available in WeWeb.

View full list of email sending integrations →

Resend

As an example, let's walk through an example of sending the link via email using the Resend integration.

Steps:

  1. Add the Send Email action from the available Resend actions
  2. Bind fields of the action:
    • To → email from the event data
    • Subject → e.g., “Your verification code”
    • HTML/Text → include the otp from the event data in the message body

Example HTML snippet:

html
<p>Hi,</p>
<p>Your verification code is: <strong>{{otp}}</strong></p>
<p>This code will expire shortly. If you didn’t request it, you can ignore this email.</p>