Skip to main content

Common Struct Descriptions

General Field Descriptions

Field NameTypeMax String Length LimitDescriptionValue Description
secretstring32OpenIM secret key, located in server's config.yaml secret fieldString
platformIDintType of terminal when user logs iniOS 1, Android 2, Windows 3, OSX 4, WEB 5, Mini Program 6, linux 7, AndroidPad 8, IPad 9, Admin 10
userIDstring64User ID, unique within IMString
nicknamestring255NicknameString
faceURLstring255Avatar URLURL link
exstring1024Extended field, suggest to be encapsulated as a JSON stringString/JSON
operationIDstringOperation ID, used for issue tracking, suggest to use current time, random number and userIDString
operatorUserIDstring64Operator, meaning varies based on contextString
groupIDstring64Group ID, unique within IMString

PublicUserInfo

User Public Information Object

Field NameTypeMax String Length LimitDescription
userIDstringUser ID
nicknamestringUsername
faceURLstringUser avatar
exstringExtended field

UserInfo

User Information Object

Field NameTypeMax String Length LimitDescriptionValue Description
userIDstringUser ID
nicknamestringUsername
faceURLstringUser avatar
exstringExtended field
createTimeintCreation time
appMangerLevelintInternal field, can be ignored
globalRecvMsgOptintGlobal offline push reception0: Receive, 2: Don't receive

FriendInfo

Friend Information Object

Field NameTypeMax String Length LimitDescriptionValue Description
ownerUserIDstringUser ID
remarkstring255Remark
createTimeintCreation time
addSourceintAddition source
operatorUserIDstringOperator ID
exstringExtended field
friendUserUserInfo-User Information Object

BlackInfo

Blacklist Information Object

Field NameTypeMax String Length LimitDescriptionValue Description
ownerUserIDstringUser ID
createTimeintBlacklisting time
blackUserInfoPublicUserInfoBlacklisted user info
addSourceintBlacklisting source
operatorUserIDstringOperator ID
exstringExtended field

GroupInfo

Group Information Object

Field NameTypeMax String Length LimitDescriptionValue Explanation
groupIDstringGroup ID
groupNamestringGroup Name
notificationstringGroup Announcement
introductionstringGroup Introduction
faceURLstringGroup Avatar
ownerUserIDstringGroup Owner ID
createTimeintCreation Time
memberCountintNumber of Group Members
exstringGroup Extended Field
statusintGroup Status0: Normal, 1: Banned (not used), 2: Dissolved, 3: Everyone Muted
creatorUserIDstringGroup Creator ID
groupTypeintGroup TypeFixed at 2
needVerificationintVerification Required to Join?0: Join request needs approval, members can invite directly, 1: All need verification except owner and admin, 2: Join directly
lookMemberInfointCan View Other Members' Info?0: Allowed to view, 1: Not allowed
applyMemberFriendintGroup Members Can Add Friends?0: Allowed to add from group members, 1: Not allowed
notificationUpdateTimeintLast Update Time for Announcement
notificationUserIDstringLast User ID to Set Announcement

GroupMemberInfo

Group Member Information Object

Field NameTypeMax String Length LimitDescriptionValue Explanation
groupIDstringGroup ID
userIDstringMember ID
roleLevelintMember Level100: Group Owner, 60: Admin, 20: Regular Member
joinTimeintTime Member Joined
nicknamestringMember's Nickname in Group
faceURLstringMember's Avatar in Group
appMangerLevelintInternal Field, Can be Ignored
joinSourceintHow the Member Joined1: Invited by Admin, 2: Invited by Member, 3: Joined by Search, 4: Joined by QR Code
operatorUserIDstringUser ID of the Join Operator
exstringMember Extended Field
muteEndTimeintEnd Time for Mute
inviterUserIDstringID of the Person who Invited

FriendRequestInfo

Friend Request Object

Field NameTypeMax String Length LimitDescriptionValue Explanation
fromUserIDstringUser ID of the Requester
fromNicknamestringUsername of the Requester
fromFaceURLstringAvatar of the Requester
toUserIDstringUser ID of the Receiver
toNicknamestringUsername of the Receiver
toFaceURLstringAvatar of the Receiver
handleResultintStatus of Friend Request1: Accepted, 0: Pending, -1: Rejected
reqMsgstring255Request Message
createTimeintCreation Time
handlerUserIDstringID of the Person Handling
handleMsgstring255Handling Message
handleTimeintHandling Time
exstringExtended Field

GroupRequestInfo

Group Joining Request Object

Field NameTypeMax String Length LimitDescriptionValue Explanation
userInfoPublicUserInfoInformation of the Applicant
groupInfoGroupInfoGroup Information
handleResultintHandling Result1: Accepted, 0: Pending, -1: Rejected
reqMsgstring255Group Joining Request Message
handleMsgstring1024Handling Message
reqTimeintRequest Time
handleUserIDstringID of the Person Handling
handleTimeintHandling Time
exstringExtended Fieldfor Group Request
joinSourceintSource of Joining1: Invited by Admin, 2: Invited by Member, 3: Joined by Search, 4: Joined by QR Code
inviterUserIDstringID of the Inviter

PictureBaseInfo

Basic Picture Information

Field NameTypeMax String Length LimitDescriptionValue Range
uuidstringUnique Picture UUID
typestringPicture Type
sizeintPicture Size
widthintPicture Width
heightintPicture Height