API Reference

Authorize User Using Password Generated in Web2Wave

This guide shows how to authenticate users in your mobile app using a password generated during a Web2Wave quiz session.


πŸ” Flow Overview

  1. Generate a password in a Web2Wave quiz.
  2. Save the password and email to Web2Wave user properties.
  3. Display the password to the user.
  4. Prompt for email + password in the mobile app.
  5. Validate credentials by fetching user properties from Web2Wave API.

🧩 Step 1: Generate & Store Password in Quiz

const password = Math.random().toString(36).slice(-8); // e.g., "k3f9b6qz"

AnalyticsManger.setUserProperty('password', password);

Step 2: Show it to user

Use {**password**} in HTML block to show it to user.


πŸ“² Step 3: Build Mobile App Login Screen

Prompt the user to enter:

  • Their email
  • The password shown in the quiz

🌐 Step 4: Fetch User Properties from Web2Wave

Use https://docs.web2wave.com/reference/get_user-properties#/ or SDK

You will receive these values:

{
  "user_id": "abc123",
  "properties": [
    {
      "property": "email",
      "value": "[email protected]"
    },
    {
      "property": "password",
      "value": "k3f9b6qz"
    }
  ]
}

Check that entered password is the same as user entered.