Common Struct Descriptions
General Field Descriptions
Field Name | Type | Max String Length Limit | Description | Value Description |
---|---|---|---|---|
secret | string | 32 | OpenIM secret key, located in server's config.yaml secret field | String |
platformID | int | Type of terminal when user logs in | iOS 1, Android 2, Windows 3, OSX 4, WEB 5, Mini Program 6, linux 7, AndroidPad 8, IPad 9, Admin 10 | |
userID | string | 64 | User ID, unique within IM | String |
nickname | string | 255 | Nickname | String |
faceURL | string | 255 | Avatar URL | URL link |
ex | string | 1024 | Extended field, suggest to be encapsulated as a JSON string | String/JSON |
operationID | string | Operation ID, used for issue tracking, suggest to use current time, random number and userID | String | |
operatorUserID | string | 64 | Operator, meaning varies based on context | String |
groupID | string | 64 | Group ID, unique within IM | String |
PublicUserInfo
User Public Information Object
Field Name | Type | Max String Length Limit | Description |
---|---|---|---|
userID | string | User ID | |
nickname | string | Username | |
faceURL | string | User avatar | |
ex | string | Extended field |
UserInfo
User Information Object
Field Name | Type | Max String Length Limit | Description | Value Description |
---|---|---|---|---|
userID | string | User ID | ||
nickname | string | Username | ||
faceURL | string | User avatar | ||
ex | string | Extended field | ||
createTime | int | Creation time | ||
appMangerLevel | int | Internal field, can be ignored | ||
globalRecvMsgOpt | int | Global offline push reception | 0: Receive, 2: Don't receive |
FriendInfo
Friend Information Object
Field Name | Type | Max String Length Limit | Description | Value Description |
---|---|---|---|---|
ownerUserID | string | User ID | ||
remark | string | 255 | Remark | |
createTime | int | Creation time | ||
addSource | int | Addition source | ||
operatorUserID | string | Operator ID | ||
ex | string | Extended field | ||
friendUser | UserInfo | - | User Information Object |
BlackInfo
Blacklist Information Object
Field Name | Type | Max String Length Limit | Description | Value Description |
---|---|---|---|---|
ownerUserID | string | User ID | ||
createTime | int | Blacklisting time | ||
blackUserInfo | PublicUserInfo | Blacklisted user info | ||
addSource | int | Blacklisting source | ||
operatorUserID | string | Operator ID | ||
ex | string | Extended field |
GroupInfo
Group Information Object
Field Name | Type | Max String Length Limit | Description | Value Explanation |
---|---|---|---|---|
groupID | string | Group ID | ||
groupName | string | Group Name | ||
notification | string | Group Announcement | ||
introduction | string | Group Introduction | ||
faceURL | string | Group Avatar | ||
ownerUserID | string | Group Owner ID | ||
createTime | int | Creation Time | ||
memberCount | int | Number of Group Members | ||
ex | string | Group Extended Field | ||
status | int | Group Status | 0: Normal, 1: Banned (not used), 2: Dissolved, 3: Everyone Muted | |
creatorUserID | string | Group Creator ID | ||
groupType | int | Group Type | Fixed at 2 | |
needVerification | int | Verification Required to Join? | 0: Join request needs approval, members can invite directly, 1: All need verification except owner and admin, 2: Join directly | |
lookMemberInfo | int | Can View Other Members' Info? | 0: Allowed to view, 1: Not allowed | |
applyMemberFriend | int | Group Members Can Add Friends? | 0: Allowed to add from group members, 1: Not allowed | |
notificationUpdateTime | int | Last Update Time for Announcement | ||
notificationUserID | string | Last User ID to Set Announcement |
GroupMemberInfo
Group Member Information Object
Field Name | Type | Max String Length Limit | Description | Value Explanation |
---|---|---|---|---|
groupID | string | Group ID | ||
userID | string | Member ID | ||
roleLevel | int | Member Level | 100: Group Owner, 60: Admin, 20: Regular Member | |
joinTime | int | Time Member Joined | ||
nickname | string | Member's Nickname in Group | ||
faceURL | string | Member's Avatar in Group | ||
appMangerLevel | int | Internal Field, Can be Ignored | ||
joinSource | int | How the Member Joined | 1: Invited by Admin, 2: Invited by Member, 3: Joined by Search, 4: Joined by QR Code | |
operatorUserID | string | User ID of the Join Operator | ||
ex | string | Member Extended Field | ||
muteEndTime | int | End Time for Mute | ||
inviterUserID | string | ID of the Person who Invited |
FriendRequestInfo
Friend Request Object
Field Name | Type | Max String Length Limit | Description | Value Explanation |
---|---|---|---|---|
fromUserID | string | User ID of the Requester | ||
fromNickname | string | Username of the Requester | ||
fromFaceURL | string | Avatar of the Requester | ||
toUserID | string | User ID of the Receiver | ||
toNickname | string | Username of the Receiver | ||
toFaceURL | string | Avatar of the Receiver | ||
handleResult | int | Status of Friend Request | 1: Accepted, 0: Pending, -1: Rejected | |
reqMsg | string | 255 | Request Message | |
createTime | int | Creation Time | ||
handlerUserID | string | ID of the Person Handling | ||
handleMsg | string | 255 | Handling Message | |
handleTime | int | Handling Time | ||
ex | string | Extended Field |
GroupRequestInfo
Group Joining Request Object
Field Name | Type | Max String Length Limit | Description | Value Explanation | |
---|---|---|---|---|---|
userInfo | PublicUserInfo | Information of the Applicant | |||
groupInfo | GroupInfo | Group Information | |||
handleResult | int | Handling Result | 1: Accepted, 0: Pending, -1: Rejected | ||
reqMsg | string | 255 | Group Joining Request Message | ||
handleMsg | string | 1024 | Handling Message | ||
reqTime | int | Request Time | |||
handleUserID | string | ID of the Person Handling | |||
handleTime | int | Handling Time | |||
ex | string | Extended Field | for Group Request | ||
joinSource | int | Source of Joining | 1: Invited by Admin, 2: Invited by Member, 3: Joined by Search, 4: Joined by QR Code | ||
inviterUserID | string | ID of the Inviter |
PictureBaseInfo
Basic Picture Information
Field Name | Type | Max String Length Limit | Description | Value Range |
---|---|---|---|---|
uuid | string | Unique Picture UUID | ||
type | string | Picture Type | ||
size | int | Picture Size | ||
width | int | Picture Width | ||
height | int | Picture Height |
ConversationInfo
Conversation Information
Field Name | Type | Maximum String Length | Description | Range |
---|---|---|---|---|
ownerUserID | string | Owner user ID of the conversation | ||
conversationID | string | Conversation ID | ||
recvMsgOpt | int | Receive message options: 0 to receive messages, 1 to not receive messages, 2 to receive messages but not notify | ||
conversationType | int | Conversation type: 1 for single chat, 3 for group chat | ||
userID | string | User ID of the conversation, valid when the conversation type is 1 | ||
groupID | string | Group ID of the conversation, valid when the conversation type is 3 | ||
isPinned | boolean | Whether the conversation is pinned | ||
attachedInfo | string | Extended field used by openIM | ||
isPrivateChat | boolean | Whether self-destructing messages are enabled | ||
groupAtType | int | Group conversation announcement strong alert type, special identifier for group announcements @ownerUserID, @all | ||
ex | string | Extended field used by the user | ||
burnDuration | int | Duration of self-destructing messages | ||
minSeq | int | Minimum sequence number the user can retrieve in the conversation | ||
maxSeq | int | Maximum sequence number the user can retrieve in the conversation | ||
msgDestructTime | int | Message destruction interval | ||
latestMsgDestructTime | int | Latest message destruction time | ||
isMsgDestruct | boolean | Whether timed message destruction is enabled |