Common Fields
Common Field Descriptions
Field Name | Type | String Length Limit | Description | Value Description |
---|---|---|---|---|
secret | string | 32 | OpenIM secret, the secret field from the server-side config/share.yml file | String |
platformID | int | Device type when the user logs in | 1: iOS, 2: Android, 3: Windows, 4: OSX, 5: WEB, 6: Mini Program, 7: Linux, 8: AndroidPad, 9: IPad, 10: Admin | |
userID | string | 64 | User ID, must be unique within the IM system | String |
nickname | string | 255 | Nickname | String |
faceURL | string | 255 | Profile picture URL | URL |
ex | string | 1024 | Extended field, recommended to be encapsulated as a JSON string | String/JSON |
operationID | string | Operation ID, used for tracking issues, must be unique, suggested to use current timestamp, random number, and userID | String | |
operatorUserID | string | 64 | Operator, specific meaning depends on the context | String |
groupID | string | 64 | Group ID, must be unique within the IM system | String |
sessionType | int | Session type | 1: Single chat, 3: Group chat, 4: System notification |
PublicUserInfo
Public user information object
Field Name | Type | Max String Length | Description |
---|---|---|---|
userID | string | 64 | User ID |
nickname | string | 255 | Username |
faceURL | string | 255 | Profile picture URL |
ex | string | 1024 | Extended field |
UserInfo
User information object
Field Name | Type | Max String Length | Description | Value Description |
---|---|---|---|---|
userID | string | User ID | ||
nickname | string | Username | ||
faceURL | string | Profile picture URL | ||
ex | string | Extended field | ||
createTime | int | Creation time | ||
appMangerLevel | int | Internal field, can be ignored | ||
globalRecvMsgOpt | int | Global offline message reception option | 0: Receive; 2: Do not receive |
FriendInfo
Friend information object
Field Name | Type | Max String Length | Description | Value Description |
---|---|---|---|---|
ownerUserID | string | User ID | ||
remark | string | Remark | ||
createTime | int | Creation time | ||
addSource | int | Add source | ||
operatorUserID | string | Operator ID | ||
ex | string | Extended field | ||
friendUser | UserInfo | - | User information object |
BlackInfo
Blacklist information object
Field Name | Type | Max String Length | Description | Value Description |
---|---|---|---|---|
ownerUserID | string | User ID | ||
createTime | int | Blacklist time | ||
blackUserInfo | PublicUserInfo | Blacklisted user information | ||
addSource | int | Blacklist source | ||
operatorUserID | string | Operator ID | ||
ex | string | Extended field |
GroupInfo
Object containing group information.
Field Name | Type | Max String Length | Description | Value Description |
---|---|---|---|---|
groupID | string | Group ID | ||
groupName | string | Group name | ||
notification | string | Group announcement | ||
introduction | string | Group introduction | ||
faceURL | string | Group profile picture URL | ||
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: Active; 1: Banned (unused); 2: Disbanded; 3: All muted | |
creatorUserID | string | Group creator ID | ||
groupType | int | Group type | Fixed at 2 | |
needVerification | int | Is verification required to join the group | 0: Join requests require approval, member invites are automatic; 1: Everyone needs verification except admin invites; 2: Join automatically | |
lookMemberInfo | int | Can group members view other members' info? | 0: Yes; 1: No | |
applyMemberFriend | int | Can group members add friends? | 0: Yes; 1: No | |
notificationUpdateTime | int | Last group announcement update time | ||
notificationUserID | string | Last user to update the group announcement |
GroupMemberInfo
Object containing group member information.
Field Name | Type | Max String Length | Description | Value Description |
---|---|---|---|---|
groupID | string | Group ID | ||
userID | string | Group member ID | ||
roleLevel | int | Group member role | 100: Owner; 60: Admin; 20: Member | |
joinTime | int | Group join time | ||
nickname | string | Group member nickname | ||
faceURL | string | Group member profile picture URL | ||
appManagerLevel | int | Internal field, can be ignored | ||
joinSource | int | Join source | 1: Admin invite; 2: Member invite; 3: Search to join; 4: QR code join | |
operatorUserID | string | Operator user ID | ||
ex | string | Extended field | ||
muteEndTime | int | Mute end time | ||
inviterUserID | string | ID of the person who invited the member |
FriendRequestInfo
Object containing friend request information.
Field Name | Type | Max String Length | Description | Value Description |
---|---|---|---|---|
fromUserID | string | Requesting user's ID | ||
fromNickname | string | Requesting user's nickname | ||
fromFaceURL | string | Requesting user's profile picture URL | ||
toUserID | string | Receiving user's ID | ||
toNickname | string | Receiving user's nickname | ||
toFaceURL | string | Receiving user's profile picture URL | ||
handleResult | int | Friend request status | 1: Accepted; 0: Pending; -1: Declined | |
reqMsg | string | Request message | ||
createTime | int | Creation time | ||
handlerUserID | string | Handler ID | ||
handleMsg | string | Handling message | ||
handleTime | int | Handling time | ||
ex | string | Extended field |
GroupRequestInfo
Group join request object
Field Name | Type | Max String Length | Description | Value Explanation |
---|---|---|---|---|
userInfo | PublicUserInfo | Information of the user requesting to join the group | ||
groupInfo | GroupInfo | Group information | ||
handleResult | int | Processing result | 1: Accepted; 0: Pending; -1: Rejected | |
reqMsg | string | Message with the group join request | ||
handleMsg | string | Message handling details | ||
reqTime | int | Request timestamp | ||
handleUserID | string | ID of the user handling the request | ||
handleTime | int | Timestamp of handling | ||
ex | string | Extended field for group request | ||
joinSource | int | Source of group joining | 1: Admin invite; 2: Member invite; 3: Search; 4: QR code | |
inviterUserID | string | ID of the inviter |
PictureBaseInfo
Picture Base Information
Field Name | Type | Max String Length | Description | Value Range |
---|---|---|---|---|
uuid | string | Unique UUID of the picture | ||
type | string | Picture type | ||
size | int | Picture size | ||
width | int | Picture width | ||
height | int | Picture height |
ConversationInfo
Conversation Information
Field Name | Type | Max String Length | Description | Value Range |
---|---|---|---|---|
ownerUserID | string | User ID of the conversation owner | ||
conversationID | string | Conversation ID | ||
recvMsgOpt | int | Message reception options: 0 for receive; 1 for mute; 2 for silent receive | ||
conversationType | int | Conversation type, 1 for single chat, 3 for group chat | ||
userID | string | User ID for the conversation, applicable when type is 1 | ||
groupID | string | Group ID for the conversation, applicable when type is 3 | ||
isPinned | boolean | Whether the conversation is pinned | ||
attachedInfo | string | OpenIM-specific extended field | ||
isPrivateChat | boolean | Whether private chat mode is enabled | ||
groupAtType | int | Group mention type: special identifiers for @ownerUserID or @all | ||
ex | string | User-specific extended field | ||
burnDuration | int | Duration of message burn after reading | ||
minSeq | int | Minimum sequence the user can retrieve in this conversation | ||
maxSeq | int | Maximum sequence the user can retrieve in this conversation | ||
msgDestructTime | int | Interval for message destruction | ||
latestMsgDestructTime | int | Latest message destruction timestamp | ||
isMsgDestruct | boolean | Whether timed message destruction is enabled |