Get User Information

Overview

Retrieve the detailed information of the currently logged-in user. This API can be used to obtain the personal profile, login status, and other related information of the currently authenticated user.


API Endpoint

Get Current User Information

Retrieve the complete profile of the currently logged-in user.

GET /me

Headers

ParameterTypeRequiredDescription
IM-CLIENT-KEYstringClient Key
IM-AuthorizationstringClient Token

Example Request

GET /me HTTP/1.1
IM-Authorization: fVy7YhqBZqEzNO9LhMmcyA==
IM-CLIENT-KEY: 9FSk26d4AIbZh0k44F5+DzbetgAJA9WjC7WP36Khm6c=
Host: your-app.imkit.io
Connection: close

JavaScript Example:

const response = await axios.get(
  `https://your-app.imkit.io/me`,
  {
    headers: {
      "IM-CLIENT-KEY": IM_CLIENT_KEY,
      "IM-Authorization": TOKEN,
    },
  }
);

cURL Example:

curl -X "GET" "https://your-app.imkit.io/me" \
     -H 'IM-CLIENT-KEY: {IM-CLIENT-KEY}' \
     -H 'IM-Authorization: {IM-Authorization}'

Response

Success Response (200 OK)

ParameterTypeDescription
RCnumberResponse code (0 indicates success)
RMstringResponse message
resultobjectUser detailed information

User Object Structure

ParameterTypeDescription
_idstringUnique user identifier
emailstringUser email
nicknamestringUser display name
appIDstringApplication identifier
avatarUrlstringUser avatar URL
addressobjectLast connected network address information
userAgentstringLast used browser/application information
lastLoginTimeMSnumberLast login time (millisecond timestamp)
notificationEnabledbooleanWhether notifications are enabled

Example Response

{
  "RC": 0,
  "RM": "OK",
  "result": {
    "_id": "1485248560558",
    "email": "test@test.com",
    "nickname": "Test CCDD",
    "appID": "SampleApp",
    "__v": 0,
    "avatarUrl": "http://example.com/avatarUrl",
    "address": {
      "port": 52808,
      "family": "IPv6",
      "address": "::ffff:210.242.193.226"
    },
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36",
    "lastLoginTimeMS": 1486027236514,
    "notificationEnabled": true
  }
}

Error Response

401 Unauthorized - Authentication failed

{
  "RC": 401,
  "RM": "Unauthorized",
  "error": {
    "code": "INVALID_TOKEN",
    "message": "Invalid or expired token"
  }
}

403 Forbidden - Invalid Client Key

{
  "RC": 403,
  "RM": "Forbidden",
  "error": {
    "code": "INVALID_CLIENT_KEY",
    "message": "Invalid client key"
  }
}

Use Cases

User Profile Display

  • Profile Page: Display the user’s personal information in the application
  • Settings Page: Load the current user’s settings for editing
  • Permission Check: Verify user identity and permissions

Status Check

  • Login Verification: Confirm whether the user’s login status is valid
  • Session Management: Check whether the user’s session has expired
  • Notification Settings: Confirm the user’s notification preferences

Notes

  • Authentication Required: This API requires valid user authentication
  • Sensitive Information: Sensitive information such as passwords is not returned
  • Caching Recommendation: User information can be appropriately cached to improve performance
  • Privacy Protection: Only the information of the currently authenticated user is returned
© 2026 FUNTEK Software Inc. All rights reserved.