Documentation
Use Participant's Email in Offchain App

How to Use Participant's Email Address in Offchain App

The following guide will walk you through the process of using a participant's email address in an off-chain app.

Step 1: Setup an off-chain app campaign

Follow the Off-chain App Guide and create a new campaign.

Step 2: Use the following API query and expression

After setting up the Off-chain app and adding endpoint details, you can use the following API query and expression to include the participant's wallet address in the request:

API Query

mail={EMAIL}

If the response is like this:

{
   "isValid": true
}

API Expression

function(response) {
    if (response.isValid) {
        return 1
    }
    return 0
}

Step 3: Save and submit your campaign

Once you have set up the Off-chain app with the API query and expression, save and submit your campaign. The participant's email address will be included in the request to the endpoint, and the response will be validated based on the expression provided.