Skip to main content

Get Current User Information

GET 

/auth/v1/user/me

API Description

Get the current logged-in user's basic information, including user profile, bound identity sources, role permissions, etc.

Input Requirements:

  • Authorization: Current logged-in user's access_token (required, passed in request header, format Bearer xxx)
  • client_id: Client ID corresponding to the application (optional, defaults to environment ID)
  • x-device-id: Device ID (optional, current logged-in device ID)

Prerequisites:

  • Need valid access_token
  • User must be logged in

Output:

  • Returns complete user information object (v1Profile)
  • Includes user basic information, bound identity sources, role permissions, status, etc.

Get User Information Request Example

GET /auth/v1/user/me
Authorization: Bearer your_access_token
x-device-id: device_123456

Get User Information Response Example

{
"sub": "9876543210123456789",
"name": "Zhang San",
"picture": "https://example/avatar.jpg",
"username": "zhangsan",
"email": "zhangsan@example",
"phone_number": "+86 13000000000",
"providers": [
{
"id": "email",
"provider_user_id": "zhangsan@example",
"name": "Email Login",
"picture": "",
"url": "",
"meta": {}
}
],
"status": "ACTIVE",
"gender": "MALE",
"groups": [
{
"id": "user"
}
],
"meta": {
"department": "Technology Department",
"position": "Development Engineer"
},
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-15T10:30:00Z",
"password_updated_at": "2023-01-01T00:00:00Z",
"user_id": "9876543210123456789",
"has_password": true,
"internal_user_type": "generalUser",
"type": "external",
"user_source": 1,
"user_desc": "Regular User",
"last_login": "2023-01-15T10:30:00Z"
}

Usage Scenarios:

  • Get personal information after user login
  • Display user profile page
  • Check user permissions and roles
  • Get user's bound login methods

Key Characteristics:

  • Returns complete user information, including sensitive information (email, phone number, etc.)
  • Includes all identity sources bound to user
  • Shows user status and role permissions
  • Provides user extended information (meta field)

Request

Responses

A successful response.

Response Headers