public class ImTrait extends BaseServiceImpl
| Modifier and Type | Class and Description |
|---|---|
static class |
ImTrait.ResponseModel |
apiInfoList, credentials, ISigner, serviceInfo| Modifier | Constructor and Description |
|---|---|
protected |
ImTrait() |
protected |
ImTrait(ServiceInfo serviceInfo) |
destroy, getAccessKey, getApiInfoList, getHttpClient, getISigner, getRegion, getSecretKey, getServiceInfo, getSessionToken, getSignUrl, json, makeRequest, post, postDataWithResponse, postFileMultiPart, prepareRequest, proto, put, putData, putData, putDataWithResponse, putDataWithResponse, query, setAccessKey, setClientNoReuse, setConnectionTimeout, setHost, setHttpClient, setRegion, setScheme, setSecretKey, setServiceInfo, setSessionToken, setSocketTimeout, signSts2protected ImTrait()
protected ImTrait(ServiceInfo serviceInfo)
public GetConversationMarksRes getConversationMarks(GetConversationMarksBody body) throws Exception
getConversationMarks
会话标记查询
你可以调用GetConversationMarks接口,指定你所属的AppId、会话成员 ID 和标记类型进行会话标记。目前仅直播群支持
body - body payloadException - error during requestpublic MarkConversationRes markConversation(MarkConversationBody body) throws Exception
markConversation
标记会话
你可以调用MarkConversation接口,指定你所属的AppId、会话成员 ID 和标记类型进行给会话标记。目前仅直播群支持
body - body payloadException - error during requestpublic ModifyParticipantReadIndexRes modifyParticipantReadIndex(ModifyParticipantReadIndexBody body) throws Exception
modifyParticipantReadIndex
修改会话成员已读位置
你可以使用此接口修改会话成员的已读位置。
body - body payloadException - error during requestpublic GetMessagesReadReceiptRes getMessagesReadReceipt(GetMessagesReadReceiptBody body) throws Exception
getMessagesReadReceipt
获取消息的已读回执详情
你可以调用GetMessagesReadReceipt接口,指定你所属的AppId、会话 Id 和消息Id获得消息的已读详情
body - body payloadException - error during requestpublic ScanConversationParticipantListRes scanConversationParticipantList(ScanConversationParticipantListBody body) throws Exception
scanConversationParticipantList
分批扫描群聊中的成员详细信
你可以使用此接口分批扫描群中成员的详细信息。
body - body payloadException - error during requestpublic BatchGetBlockParticipantsRes batchGetBlockParticipants(BatchGetBlockParticipantsBody body) throws Exception
batchGetBlockParticipants
分批获得禁言/拉黑成员列表
你可以使用此接口分批在直播群中获得禁言或拉黑成员列表。
body - body payloadException - error during requestpublic IsUserInConversationRes isUserInConversation(IsUserInConversationBody body) throws Exception
isUserInConversation
判断用户是否在会话中
你可以使用此接口判断用户是否在会话中。
body - body payloadException - error during requestpublic BatchModifyConversationParticipantRes batchModifyConversationParticipant(BatchModifyConversationParticipantBody body) throws Exception
batchModifyConversationParticipant
批量修改群聊成员详情
你可以使用此接口批量对群成员的详细信息进行修改。
body - body payloadException - error during requestpublic BatchDeleteConversationParticipantRes batchDeleteConversationParticipant(BatchDeleteConversationParticipantBody body) throws Exception
batchDeleteConversationParticipant
批量删除群聊成员
你可以使用此接口批量删除群成员。
body - body payloadException - error during requestpublic BatchDeleteBlockParticipantsRes batchDeleteBlockParticipants(BatchDeleteBlockParticipantsBody body) throws Exception
batchDeleteBlockParticipants
批量取消禁言/取消拉黑会话成员
你可以使用此接口在直播群中批量取消禁言或取消拉黑会话成员。
body - body payloadException - error during requestpublic BatchGetConversationParticipantRes batchGetConversationParticipant(BatchGetConversationParticipantBody body) throws Exception
batchGetConversationParticipant
批量查询会话成员详细信息
你可以使用此接口批量查询会话成员的详细信息。
body - body payloadException - error during requestpublic BatchGetWhitelistParticipantRes batchGetWhitelistParticipant(BatchGetWhitelistParticipantBody body) throws Exception
batchGetWhitelistParticipant
批量查询全员禁言下白名单成员
你可以调用BatchGetWhitelistParticipant接口,指定你所属的AppId、会话 ID、 查询起始位置和查询条数批量查询全员禁言下白名单成员。
body - body payloadException - error during requestpublic BatchAddWhitelistParticipantRes batchAddWhitelistParticipant(BatchAddWhitelistParticipantBody body) throws Exception
batchAddWhitelistParticipant
批量添加全员禁言下白名单成员
你可以使用此接口批量添加全员禁言下可发言白名单成员。
body - body payloadException - error during requestpublic BatchAddManagerRes batchAddManager(BatchAddManagerBody body) throws Exception
batchAddManager
批量添加直播群管理员
你可以使用此接口向直播群中批量添加管理员。
body - body payloadException - error during requestpublic BatchAddConversationParticipantRes batchAddConversationParticipant(BatchAddConversationParticipantBody body) throws Exception
batchAddConversationParticipant
批量添加群聊成员
你可以使用此接口向群聊中批量添加群成员。
body - body payloadException - error during requestpublic BatchAddBlockParticipantsRes batchAddBlockParticipants(BatchAddBlockParticipantsBody body) throws Exception
batchAddBlockParticipants
批量禁言/拉黑会话成员
你可以使用此接口在直播群中批量禁言或拉黑会话成员。
body - body payloadException - error during requestpublic BatchRemoveWhitelistParticipantRes batchRemoveWhitelistParticipant(BatchRemoveWhitelistParticipantBody body) throws Exception
batchRemoveWhitelistParticipant
批量移除全员禁言下白名单成员
你可以使用此接口批量移除全员禁言下白名单成员。
body - body payloadException - error during requestpublic BatchRemoveManagerRes batchRemoveManager(BatchRemoveManagerBody body) throws Exception
batchRemoveManager
批量移除直播群管理员
你可以使用此接口批量移除直播群中的管理员。
body - body payloadException - error during requestpublic BatchUpdateLiveParticipantsRes batchUpdateLiveParticipants(BatchUpdateLiveParticipantsBody body) throws Exception
batchUpdateLiveParticipants
更新直播群成员资料
你可以调用 BatchUpdateLiveParticipants 接口,指定你所属的AppId、会话 Id、 直播群成员 ID 来更新群成员资料。
目前仅直播群支持此接口
body - body payloadException - error during requestpublic GetParticipantReadIndexRes getParticipantReadIndex(GetParticipantReadIndexBody body) throws Exception
getParticipantReadIndex
查询会话成员已读位置
你可以使用此接口查询会话中所有成员的已读位置。
body - body payloadException - error during requestpublic GetConversationUserCountRes getConversationUserCount(GetConversationUserCountBody body) throws Exception
getConversationUserCount
查询会话成员数量
你可以使用此接口查询会话成员数量。
body - body payloadException - error during requestpublic QueryLiveParticipantStatusRes queryLiveParticipantStatus(QueryLiveParticipantStatusBody body) throws Exception
queryLiveParticipantStatus
查询直播群成员状态
你可以使用此接口查询群成员在直播群的状态。
body - body payloadException - error during requestpublic ModifyConversationRes modifyConversation(ModifyConversationBody body) throws Exception
modifyConversation
修改会话信息
你可以使用此接口修改会话信息。
body - body payloadException - error during requestpublic ModifyConversationSettingRes modifyConversationSetting(ModifyConversationSettingBody body) throws Exception
modifyConversationSetting
修改用户对会话的设置
你可以使用此接口查询会话成员对会话的设置
body - body payloadException - error during requestpublic CreateConversationRes createConversation(CreateConversationBody body) throws Exception
createConversation
创建会话
你可以使用此接口创建会话。
body - body payloadException - error during requestpublic BatchGetConversationsRes batchGetConversations(BatchGetConversationsBody body) throws Exception
batchGetConversations
批量查询会话
你可以使用此接口批量查询会话。
body - body payloadException - error during requestpublic GetConversationSettingRes getConversationSetting(GetConversationSettingBody body) throws Exception
getConversationSetting
查询成员对会话的设置
你可以使用此接口查询会话成员对会话的设置。
body - body payloadException - error during requestpublic GetUserConversationsRes getUserConversations(GetUserConversationsBody body) throws Exception
getUserConversations
查询用户拥有会话
你可以使用此接口查询某个成员拥有的会话。
body - body payloadException - error during requestpublic DestroyConversationRes destroyConversation(DestroyConversationBody body) throws Exception
destroyConversation
解散群聊
你可以使用此接口解散群聊。
body - body payloadException - error during requestpublic ModifyMessageRes modifyMessage(ModifyMessageBody body) throws Exception
modifyMessage
修改消息扩展字段
你可以使用此接口修改消息扩展字段。
body - body payloadException - error during requestpublic GetConversationMessagesRes getConversationMessages(GetConversationMessagesBody body) throws Exception
getConversationMessages
分批查询会话中的消息
你可以使用此接口批量查询会话中的消息。
body - body payloadException - error during requestpublic DeleteConversationMessageRes deleteConversationMessage(DeleteConversationMessageBody body) throws Exception
deleteConversationMessage
删除会话消息
你可以使用此接口删除会话中的指定消息。
body - body payloadException - error during requestpublic DeleteMessageRes deleteMessage(DeleteMessageBody body) throws Exception
deleteMessage
删除用户消息
你可以使用此接口删除用户消息。
body - body payloadException - error during requestpublic SendMessageRes sendMessage(SendMessageBody body) throws Exception
sendMessage
发送消息
你可以调用SendMessage接口,指定你所属的AppId和,发送者 UserId、会话 ID、消息类型和消息内容,进行消息发送。
用户需要在会话中才允许消息发送,且不会触发第三方回调。
发送消息前不会检查发送方是否禁言,也不会检查会话是否开启禁言。
body - body payloadException - error during requestpublic GetMessagesRes getMessages(GetMessagesBody body) throws Exception
getMessages
批量查询消息
你可以使用此接口指定消息 ID 对消息进行批量查询。
body - body payloadException - error during requestpublic RecallMessageRes recallMessage(RecallMessageBody body) throws Exception
recallMessage
撤回用户消息
你可以使用此接口撤回用户的消息。
body - body payloadException - error during requestpublic DeleteFriendRes deleteFriend(DeleteFriendBody body) throws Exception
deleteFriend
删除好友
你可以使用此接口删除好友。
body - body payloadException - error during requestpublic UpdateFriendRes updateFriend(UpdateFriendBody body) throws Exception
updateFriend
更新好友
你可以调用 UpdateFriend 接口,指定你所属的 AppId、用户 ID 和 好友 ID 更新好友信息。 一次最多支持更新 10 个好友。
body - body payloadException - error during requestpublic UpdateBlackListRes updateBlackList(UpdateBlackListBody body) throws Exception
updateBlackList
更新黑名单
你可以调用 UpdateBlackList 接口,指定你所属的 AppId、用户 ID 和黑名单中用户的 ID,更新黑名单用户的扩展信息。 一次最多支持更新 10 个好友。
body - body payloadException - error during requestpublic ListFriendRes listFriend(ListFriendBody body) throws Exception
listFriend
查询好友列表
你可以使用此接口查询指定用户的好友列表。
body - body payloadException - error during requestpublic QueryOnlineStatusRes queryOnlineStatus(QueryOnlineStatusBody body) throws Exception
queryOnlineStatus
查询用户在线状态
你可以通过QueryOnlineStatus接口,指定 AppId 和 UserId,查询指定用户的在线状态。
body - body payloadException - error during requestpublic GetBlackListRes getBlackList(GetBlackListBody body) throws Exception
getBlackList
查询黑名单
你可以使用此接口查询指定用户的黑名单列表。
body - body payloadException - error during requestpublic IsFriendRes isFriend(IsFriendBody body) throws Exception
isFriend
校验好友关系
你可以使用此接口校验两个用户之间的好友关系。
body - body payloadException - error during requestpublic IsInBlackListRes isInBlackList(IsInBlackListBody body) throws Exception
isInBlackList
校验用户是否在黑名单
你可以使用此接口查看某用户是否在黑名单中。
body - body payloadException - error during requestpublic AddFriendRes addFriend(AddFriendBody body) throws Exception
addFriend
添加好友
你可以使用此接口添加好友。
body - body payloadException - error during requestpublic AddBlackListRes addBlackList(AddBlackListBody body) throws Exception
addBlackList
添加黑名单
你可以调用 AddBlackList 接口,指定你所属的 AppId、用户 ID 和对方的用户 ID,将对方加入黑名单。一次最多支持添加 10 个用户至黑名单。
body - body payloadException - error during requestpublic GetAppTokenRes getAppToken(GetAppTokenBody body) throws Exception
getAppToken
生成Token
你可以指定你所属的AppId,UserId 和 Token过期时间来获得一个对应的Token (Token本质就是使用AppId,UserId和Token过期时间字段使用AppKey进行对称性加密)
body - body payloadException - error during requestpublic RemoveBlackListRes removeBlackList(RemoveBlackListBody body) throws Exception
removeBlackList
移出黑名单
你可以使用此接口将用户移出黑名单。
body - body payloadException - error during requestpublic UserBroadcastRes userBroadcast(UserBroadcastBody body) throws Exception
userBroadcast
全员广播
你可以调用 UserBroadcast 接口,指定你所属的 AppId、发送方 UserId,标签,标签匹配关系对符合标签的用户进行全员广播。
body - body payloadException - error during requestpublic BatchUpdateUserTagsRes batchUpdateUserTags(BatchUpdateUserTagsBody body) throws Exception
batchUpdateUserTags
更新用户标签
你可以调用 BatchUpdateUserTags 接口,指定你所属的 AppId、用户 ID、用户 Tag 对已注册的广播用户进行标签更新。
body - body payloadException - error during requestpublic RegisterUsersRes registerUsers(RegisterUsersBody body) throws Exception
registerUsers
注册用户
你可以调用 RegisterUsers 接口,指定你所属的 AppId、用户 ID , 用户 Tag 进行注册。
进行注册后,IM会存储用户资料,同时注册的用户uid列表会在全院广播的时候使用。
当前注册广播用户仅用来进行全员广播,其他操作如发消息无需注册用户。
body - body payloadException - error during requestpublic UnRegisterUsersRes unRegisterUsers(UnRegisterUsersBody body) throws Exception
unRegisterUsers
注销用户
你可以调用 UnRegisterUsers 接口,指定你所属的 AppId、用户 ID,对已注册的广播用户进行注销。
body - body payloadException - error during requestpublic BatchGetUserRes batchGetUser(BatchGetUserBody body) throws Exception
batchGetUser
查询用户资料
你可以调用 BatchGetUser 接口,指定你所属的 AppId、用户 ID,对已注册的广播用户进行查询。
body - body payloadException - error during requestpublic BatchUpdateUserRes batchUpdateUser(BatchUpdateUserBody body) throws Exception
batchUpdateUser
更新用户资料
你可以调用 BatchUpdateUser 接口,指定你所属的 AppId、用户 ID,对已注册的用户更新资料。
body - body payloadException - error during requestpublic BatchSendMessageRes batchSendMessage(BatchSendMessageBody body) throws Exception
ExceptionCopyright © 2025. All rights reserved.