TagMangoTagMango Docs
Account

Get User By Email or Phone

GET
/api/v1/external/users/lookup

Overview

This endpoint can be used to look up a user by email or phone number. At least one of email or phone must be provided. If both are provided, the lookup requires both to match the same user, else it will respond with not found.

AuthorizationBearer <token>

In: header

Query Parameters

email?string

Email address of the user to look up

phone?number

Phone number of the user to look up

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Response Body

application/json

application/json

application/json

curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/users/lookup" \  -H "x-whitelabel-host: string"
{
  "_id": "6659ca9e5f2acb7abfdcd8fd",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "host": "yourhost.tagmango.com",
  "userSlug": "john-doe",
  "phone": 1234567890,
  "profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
  "onboarding": "creator_completed",
  "isDeactivated": false,
  "country": "India",
  "dialCode": "+91",
  "currency": "USD",
  "score": {
    "lifetime": 100,
    "month": 20,
    "week": 5
  },
  "leaderboardRank": {
    "lifetime": 1,
    "month": 2,
    "week": 3
  },
  "creator": "6149b1e5612c4e5fd96041d3",
  "badges": [
    {
      "_id": "6659ca9e5f2acb7abfdcd8fd",
      "creator": "6149b1e5612c4e5fd96041d3",
      "name": "Hall Of Fame",
      "description": "Something about the badge",
      "imageUrl": "https://testing.tagmango.com/assets/badge-icon-922e7f499bc0045d7af8ac771eebe2fe.png",
      "enableAutomation": true,
      "pointsThreshold": 100,
      "pointCategoryForAutomation": "lifetime",
      "automationEnabledMangoes": [
        "6659ca9e5f2acb7abfdcd8fd",
        "6659ca9e5f2acb7abfdcd8fd"
      ],
      "createdAt": "2024-05-31T13:03:26.375Z",
      "updatedAt": "2024-07-19T12:32:51.071Z"
    }
  ],
  "hasGamificationAccess": false
}
{
  "code": 400,
  "type": "Bad request",
  "statusMessage": "BAD_REQUEST",
  "message": "Invalid request",
  "success": false
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "success": false
}