Account
Get User By Email or Phone
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.
Authorization
bearer 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
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",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}