Task 4: Create pending profiles

Developer Documentation: Creating Pending Profiles in MOTI

Overview

This document provides guidelines for developers to create pending profiles within the MOTI platform. Developers are expected to gather data from the Linktree website, map this data, and use it to create pending profiles on MOTI. Pending profiles are defined as profiles that include emails and social links from other platforms but are not yet active on MOTI.

Objectives

  1. Data Collection from Linktree:

    • Gather email addresses and social links from Linktree.

    • Ensure the data is accurately mapped and formatted for use in MOTI.

  2. Creating Pending Profiles:

    • Use the collected and mapped data to create profiles on MOTI.

    • Ensure that these profiles are marked as pending until further verification or user action.

Step-by-Step Guide

1. Data Collection from Linktree

  1. Access Linktree:

    • Go to the Linktree website and log in with your credentials.

  2. Extract Data:

    • Collect the following information for each user:

      • Email address

      • Social media links (e.g., Twitter, Instagram, LinkedIn)

      • Wallet addresses (if available)

  3. Data Mapping:

    • Organize the extracted data into a structured format. Example:

      ```
      {
        "payload": {
          "data": {
            "linktree": {
              "name": "",
              "description": "",
              // One link is mandatory
              "links": [
                {
                  "label": "Any Label1",
                  "redirectUrl": ""
                },
                // Extra labels for additional links
                {
                  "label": "Any Label2",
                  "redirectUrl": ""
                },
                {
                  "label": "Any Label3",
                  "redirectUrl": ""
                }
              ],
              "mySocials": [
                {
                  "label": "X (Twitter)",
                  "content": ""
                },
                {
                  "label": "Instagram",
                  "content": ""
                },
                {
                  "label": "Facebook",
                  "content": ""
                },
                {
                  "label": "LinkedIn",
                  "content": ""
                },
                {
                  "label": "Telegram",
                  "content": ""
                },
                {
                  "label": "WhatsApp",
                  "content": ""
                },
                {
                  "label": "Email",
                  "content": ""
                }
              ],
              "myWallets": [
                {
                  "label": "Bitcoin (BTC)",
                  "address": ""
                },
                {
                  "label": "Ethereum (ETH)",
                  "address": ""
                },
                {
                  "label": "Solana (SOL)",
                  "address": ""
                },
                {
                  "label": "Koii/K2 (KOII)",
                  "address": ""
                },
                {
                  "label": "Polygon (MATIC)",
                  "address": ""
                },
                {
                  "label": "TRON (TRX)",
                  "address": ""
                },
                {
                  "label": "Arbitrum (ARB)",
                  "address": ""
                }
              ]
            }
          },
          "userEmail": "[email protected]" // Use your email address
        }
      }
      
      ```

2. Creating Pending Profiles in MOTI

  1. API Endpoint for Profile Creation:

  2. Profile Object:

    • Construct the profile object with the mapped data

  3. API Request:

    • Send a POST request to the API endpoint with the profile object.

    • Handle responses to ensure profiles are created successfully.

    • Example request:

      curl -X POST ${BaseURL}/profiles/create \
      -H "Content-Type: application/json" \
      -d '{
        "payload": {
          "data": {
            "linktree": {
              "name": "",
              "description": "",
              "links": [
                {
                  "label": "Any Label1",
                  "redirectUrl": ""
                },
                {
                  "label": "Any Label2",
                  "redirectUrl": ""
                },
                {
                  "label": "Any Label3",
                  "redirectUrl": ""
                }
              ],
              "mySocials": [
                {
                  "label": "X (Twitter)",
                  "content": ""
                },
                {
                  "label": "Instagram",
                  "content": ""
                },
                {
                  "label": "Facebook",
                  "content": ""
                },
                {
                  "label": "LinkedIn",
                  "content": ""
                },
                {
                  "label": "Telegram",
                  "content": ""
                },
                {
                  "label": "WhatsApp",
                  "content": ""
                },
                {
                  "label": "Email",
                  "content": ""
                }
              ],
              "myWallets": [
                {
                  "label": "Bitcoin (BTC)",
                  "address": ""
                },
                {
                  "label": "Ethereum (ETH)",
                  "address": ""
                },
                {
                  "label": "Solana (SOL)",
                  "address": ""
                },
                {
                  "label": "Koii/K2 (KOII)",
                  "address": ""
                },
                {
                  "label": "Polygon (MATIC)",
                  "address": ""
                },
                {
                  "label": "TRON (TRX)",
                  "address": ""
                },
                {
                  "label": "Arbitrum (ARB)",
                  "address": ""
                }
              ]
            }
          },
          "userEmail": "[email protected]"
        }
      }'
      

Key Considerations

  • Data Accuracy: Ensure all data collected from Linktree is accurate and correctly mapped before creating profiles.

  • Error Handling: Implement robust error handling to manage cases where:

    • The email already exists in the MOTI database.

    • Required fields are missing or improperly formatted.

    • API requests fail due to network issues or server errors.

  • Security: Handle all personal data securely, adhering to data protection regulations and best practices.

Conclusion

By following this guide, developers can efficiently gather data from Linktree and use it to create pending profiles on the MOTI platform. These profiles will contain essential information such as email addresses and social links, awaiting further verification or user action to become fully active on MOTI.

For any further questions or support, please contact the MOTI development team.

Last updated