Magic Auth

Magic Auth / Signup Endpoint Guide

Introduction

This document provides a comprehensive guide on how to use the Magic Auth / Signup endpoint. This feature allows automatic signup with an email address and redirects users to specific Call-To-Action (CTA) steps.

Endpoint URL Structure

The basic structure of the Magic Auth / Signup endpoint is as follows:

https://domain.com/magic-auth?email=[email]&affiliate_provider_id=[provider_id]&affiliate_id=[affiliate_id]&tags=[tags]&redirect=[redirect_url]

Parameters:

  1. email (Required): The email address for signup. Example: [email protected]

  2. affiliate_provider_id: Identifier for the affiliate provider. Example: 1

  3. affiliate_id: Unique identifier for the user's affiliate. Example: 123456

  4. tags: Comma-separated list of tags for categorization. Example: tag1,tag2

  5. redirect: URL to which the user will be redirected after signup. Example: https://www.example.com

Using the Endpoint

Steps:

  1. Prepare the URL: Replace each parameter in the URL with the appropriate value. Ensure the email parameter is included as it's mandatory.

    Example:

    https://domain.com/[email protected]&affiliate_provider_id=1&affiliate_id=123456&tags=tag1,tag2&redirect=https://www.example.com
  2. Direct Users to the URL: Share this URL with your potential signups. When they access this link, they will be automatically signed up with the provided email and redirected to the specified URL.

Optional Parameters

  • referrer_id: This can be parsed if no affiliate information is active. This can be either a username or a UUID.

    Example:

    &referrer_id=unique_referrer_id

Best Practices

  • Ensure the email address is valid and correctly formatted.

  • Clearly communicate the purpose of the signup and what users can expect after redirection.

  • Use the tags parameter effectively for segmentation and analysis.

API Version Update

Overview

The API has been updated to include new logic for managing user data, including tagging and affiliate information. This update allows for more flexible handling of user attributes and their associations.

Example Usage

Adding/Updating a User

To add or update a user, you can use the curl command as shown in the example below. This includes setting user information, tags, affiliate details, and referrer information.

curl --location 'https://domain.com/api/users' \
--header 'X-API-KEY: 123456789' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name" : "John Doe",
    "email" : "[email protected]",  # EMAIL (Required)
    "tags": [
        "CourseX"
    ],
    "remove_tags": [     
        "CourseZ"
    ],
    "affiliate_provider_id": 1,  # Affiliate Provider ID
    "affiliate_id" : 2298579,     # User Affiliate ID
    "referrer_id" : "admin1"      # Optional Option if Affiliate Provider is not known and user name is known:Can be username or UUID (parsed if no affiliate info)
}'

Support

For any queries or assistance, please contact our support team at [email protected].

Last updated