Get current user profile with full overview
curl --request GET \
--url https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"user": {
"id": "<string>",
"fullName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"avatarUrl": "<string>",
"authProvider": "<string>",
"preferences": {
"language": "<string>",
"theme": "<string>",
"notifications": true
},
"deviceId": "<string>",
"phoneVerified": true,
"emailVerified": true,
"last_login_at": "2023-11-07T05:31:56Z"
},
"usage": {
"conversations": {
"total": 123,
"active": 123,
"archived": 123,
"deleted": 123,
"lastActiveAt": "2023-11-07T05:31:56Z"
},
"shares": {
"total": 123,
"active": 123,
"expired": 123,
"revoked": 123,
"totalViews": 123,
"lastSharedAt": "2023-11-07T05:31:56Z"
}
},
"profileContext": {
"static": [
"<string>"
],
"recent": [
"<string>"
],
"frequent": [
"<string>"
]
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)",
"code": "VALIDATION_ERROR",
"details": [
{
"field": "phone",
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)"
}
]
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)",
"code": "VALIDATION_ERROR",
"details": [
{
"field": "phone",
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)"
}
]
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Auth service
Current User Profile
Returns the complete user profile overview including user data, usage statistics (conversations, shares), and profile context (static, recent, frequent cues). Auto-creates user if not exists.
GET
/
api
/
v1
/
auth
/
me
Get current user profile with full overview
curl --request GET \
--url https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/auth/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"user": {
"id": "<string>",
"fullName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"avatarUrl": "<string>",
"authProvider": "<string>",
"preferences": {
"language": "<string>",
"theme": "<string>",
"notifications": true
},
"deviceId": "<string>",
"phoneVerified": true,
"emailVerified": true,
"last_login_at": "2023-11-07T05:31:56Z"
},
"usage": {
"conversations": {
"total": 123,
"active": 123,
"archived": 123,
"deleted": 123,
"lastActiveAt": "2023-11-07T05:31:56Z"
},
"shares": {
"total": 123,
"active": 123,
"expired": 123,
"revoked": 123,
"totalViews": 123,
"lastSharedAt": "2023-11-07T05:31:56Z"
}
},
"profileContext": {
"static": [
"<string>"
],
"recent": [
"<string>"
],
"frequent": [
"<string>"
]
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)",
"code": "VALIDATION_ERROR",
"details": [
{
"field": "phone",
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)"
}
]
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"error": {
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)",
"code": "VALIDATION_ERROR",
"details": [
{
"field": "phone",
"message": "Please enter a valid 10-digit phone number (e.g., 9876543210)"
}
]
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Returns the complete user profile overview for the authenticated user. Requires a valid Auth0
access token in the
Authorization header.
Response
The endpoint returns a comprehensive profile overview including:| Field | Description |
|---|---|
user | Full user object (id, email, name, avatar, preferences, etc.) |
usage.conversations | Conversation statistics (total, active, archived, deleted, lastActiveAt) |
usage.shares | Share statistics (total, active, expired, revoked, totalViews, lastSharedAt) |
profileContext | Cached context cues (static, recent, frequent) used by AI orchestration |
Example Response
{
"success": true,
"data": {
"user": {
"id": "683b7e9f465b1b4e6753627a4f",
"email": "investor@example.com",
"fullName": "Puneet",
"avatarUrl": "https://cdn.auth0.com/...",
"emailVerified": true,
"preferences": {
"language": "en",
"theme": "dark"
},
"createdAt": "2025-12-01T07:00:00.000Z",
"updatedAt": "2025-12-04T10:00:00.000Z"
},
"usage": {
"conversations": {
"total": 42,
"active": 38,
"archived": 3,
"deleted": 1,
"lastActiveAt": "2025-12-04T09:30:00.000Z"
},
"shares": {
"total": 5,
"active": 4,
"expired": 0,
"revoked": 1,
"totalViews": 127,
"lastSharedAt": "2025-12-03T15:00:00.000Z"
}
},
"profileContext": {
"static": ["Financial goals: Retirement planning"],
"recent": ["Discussed SIP investments"],
"frequent": ["Portfolio review", "Tax planning"]
}
}
}
Auto-sync Behavior
If the user does not exist locally or is missing critical data (name/email), the controller:- Fetches user info from Auth0’s
/userinfoendpoint - Creates or updates the local MongoDB record
- Returns the complete profile overview
⌘I