> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Learn how to configure your data verification flow actions to generate and verify one-time passwords (OTPs), and verify email addresses.

# Data verification

This list of data verification actions allows you to verify emails addresses and to generate and verify one-time passwords.

## Generate one-time password

Generates a numeric code with a validity of 5 minutes that can be sent via email, SMS or any messaging apps.

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/B7hSimOXFe7dopGk/docs/images/cdy7uua7fh8z/1h69FWzZwk9beKKjB4Cq38/16aa515e61cc6e9ebdfd0849201e3141/generate-one-time-password.png?fit=max&auto=format&n=B7hSimOXFe7dopGk&q=85&s=70bc11d30ccca091c080ed3f469790ce" alt="" width="1404" height="631" data-path="docs/images/cdy7uua7fh8z/1h69FWzZwk9beKKjB4Cq38/16aa515e61cc6e9ebdfd0849201e3141/generate-one-time-password.png" />
</Frame>

### Input settings

| Parameter                  | Description                                                                     |
| -------------------------- | ------------------------------------------------------------------------------- |
| Reference value (required) | You can bind your generated code to a phone number, email address or any value. |
| Code length (required)     | The number of digits of the generated code.                                     |

### Output object

| Property | Type   | Description        |
| -------- | ------ | ------------------ |
| `code`   | String | The generated code |

### Output object example

```json lines theme={null}
{
  "code": "███",
}
```

## Verify one-time password

Verifies if the provided one-time password code is valid or not.

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/RDh-UBFSkTEu_d9f/docs/images/cdy7uua7fh8z/3bkT8QDN4dcl0YHTrSOIGj/9698a07f55353a11ca98164377cd4217/verify-otp.png?fit=max&auto=format&n=RDh-UBFSkTEu_d9f&q=85&s=05000e7fb94a6926ec91690e7fed46ba" alt="" width="1404" height="646" data-path="docs/images/cdy7uua7fh8z/3bkT8QDN4dcl0YHTrSOIGj/9698a07f55353a11ca98164377cd4217/verify-otp.png" />
</Frame>

### Input settings

| Parameter                  | Description                                                                       |
| -------------------------- | --------------------------------------------------------------------------------- |
| Reference value (required) | Use the same reference value configured in the Generate one-time password action. |
| Code length (required)     | The number of digits of the generated code.                                       |

### Output object

| Property | Type    | Description                                                                                                                                                                                                                                                                              |
| -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `valid`  | Boolean | Indicates if the provided code is valid or not returning a `true` or `false` value.                                                                                                                                                                                                      |
| `result` | String  | Returns different result codes based on the provided code: <ul> <li> `MISSING:` The provided code does not exist. </li> <li> `EXPIRED:` The provided code has expired. </li> <li> `VALID:` The provided code is valid. </li> <li> `UNEQUAL:` The provided code is not valid. </li> </ul> |

### Output object examples

```json lines theme={null}
{
  "valid": false,
  "result": "UNEQUAL"
}
```

```json lines theme={null}
{
  "valid": true
}
```

## Verify email address

Performs a number of selected verification rules against a provided email address.

<Frame>
  <img src="https://mintcdn.com/docs-dev-docs-event-stream-action-templates/wYcZudKzAy7DVE3d/docs/images/cdy7uua7fh8z/6qkqny1hhObFalHwdEG342/1a2e18195b29102c3f68744f42277917/verify-email.png?fit=max&auto=format&n=wYcZudKzAy7DVE3d&q=85&s=17bfb5bca75acf680f7a87ebd2a9b5af" alt="" width="1404" height="1165" data-path="docs/images/cdy7uua7fh8z/6qkqny1hhObFalHwdEG342/1a2e18195b29102c3f68744f42277917/verify-email.png" />
</Frame>

### Input settings

| Parameter                        | Description                                                                                                         |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Email (required)                 | email address to verify.                                                                                            |
| Require MX record                | Require MX records. When a domain lacks MX records, email servers do not know where to send emails for that domain. |
| Block free email providers       | Block free email providers like @gmail.com, @hotmail.com, etc.                                                      |
| Block disposable email providers | Block disposable emails like @mailnator.com, @maildrop.cc, etc.                                                     |
| Block email account aliases      | Block email with aliases like `jane.doe+alias@gmail.com`                                                            |
| Allowlist domains                | Allow emails only from approved domains in your list.                                                               |
| Blocklist domains                | Block specific email domains.                                                                                       |

### Output object

| Property | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `valid`  | Boolean | Returns `true` or `false` depending on whether or not the email has met the verification rules.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `cause`  | String  | If the valid property is `<br/>false<br/>` , returns a reference of the first rule that the email did not meet: <ul> <li> `MISSING_MX_RECORD:` The email domain does not have MX records. </li> <li> `FREE_EMAIL:` The email domain is a free email provider.</li> <li> `DISPOSABLE_EMAIL:` The email is a disposable email address.</li> <li> `BLOCKLISTED:` The email domain is included in the Blocklist domains setting.</li> <li> `NOT_ALLOWED:` The email domain is not included in the Allowlist domains setting.</li> </ul> |

### Output object example

```json lines theme={null}
{
  "valid": false,
  "cause": "FREE_EMAIL"
}
```

```json lines theme={null}
{
  "valid": true,
  "cause": null
}
```
