Skip to main content

Overview

The NTQQUserApi class provides methods for retrieving user information, managing profiles, handling conversions between UID/UIN, and accessing user-related services.

User Information

getUserDetailInfo

Get detailed information about a user.
string
required
User UID
boolean
default:"false"
Whether to fetch from server instead of cache
User
User object with detailed information
Example:

fetchUserDetailInfo

Fetch user detail from specific source.
string
required
User UID
UserDetailSource
default:"UserDetailSource.KDB"
Data source: KDB (cache) or KSERVER (server)
UserDetailInfo
Detailed user profile information

getCoreAndBaseInfo

Get core and basic information for multiple users.
string[]
required
Array of user UIDs
Map<string, UserInfo>
Map of UID to user information
Example:

UID/UIN Conversion

getUidByUinV2

Convert UIN to UID.
string
required
User UIN (QQ number)
string
User UID, or empty string if not found
Example:

getUinByUidV2

Convert UID to UIN.
string
required
User UID
string
User UIN (QQ number), or ‘0’ if not found
Example:

Profile Management

modifySelfProfile

Modify bot’s own profile.
ModifyProfileParams
required
Object containing profile fields to modify
Example:

setLongNick

Set bot’s signature/personal description.
string
required
Signature text
Example:

setQQAvatar

Set bot’s QQ avatar.
string
required
Path to image file
{ result: number, errMsg: string }
Result code and error message
Example:

Online Status

setSelfOnlineStatus

Set bot’s online status.
number
required
Status code (online, away, busy, etc.)
number
required
Extended status code
number
required
Battery status
Example:

setDiySelfOnlineStatus

Set custom online status with emoji and text.
string
required
Emoji/face ID
string
required
Status text
string
required
Face type identifier
Example:

Profile Likes

like

Send like(s) to a user’s profile.
string
required
Target user UID
number
default:"1"
Number of likes to send (1-20)
{ result: number, errMsg: string, succCounts: number }
Result with success count
Example:

getProfileLike

Get profile like information.
string
required
User UID
number
required
Starting index
number
required
Number of records to fetch
number
default:"2"
Type: 2 for self, 1 for others

Cookies & Authentication

getCookies

Get cookies for a specific domain.
string
required
Domain name (e.g., ‘qun.qq.com’)
{ [key: string]: string }
Object containing cookies
Example:

getPSkey

Get PSkey for domains.
string[]
required
Array of domain names
{ domainPskeyMap: Map<string, string> }
Map of domain to PSkey
Example:

getSKey

Get SKey for authentication.
string | undefined
SKey string if successful

getQzoneCookies

Get cookies specifically for Qzone.
{ [key: string]: string }
Qzone cookies

forceFetchClientKey

Force fetch client key.
{ result: number, clientKey: string, keyIndex: string }
Client key information

Recent Contacts

getRecentContactList

Get list of recent contacts.
RecentContact[]
Array of recent contact objects

getRecentContactListSnapShot

Get snapshot of recent contacts.
number
required
Number of contacts to retrieve

getRecentContactListSync

Get synced recent contact list.

getRecentContactListSyncLimit

Get synced recent contacts with limit.
number
required
Maximum number of contacts

Utility Methods

getUserDetailInfoByUin

Get user detail by UIN directly.
string
required
User UIN (QQ number)

getBuddyRecommendContactArkJson

Get friend recommendation card in Ark JSON format.
string
required
User UIN
string
default:"''"
Scene ID

getRobotUinRange

Get robot UIN range information.
Array<unknown>
Array of robot UIN range data

Complete Example