Show / Hide Table of Contents

Class TencentIMSDK

Inheritance
System.Object
TencentIMSDK
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: com.tencent.imsdk.unity
Assembly: cs.temp.dll.dll
Syntax
public class TencentIMSDK

Methods

AddRecvNewMsgCallback(RecvNewMsgCallback)

Add the callback for receiving new messages

If the user has logged in, IM SDK will send new messages through the callback set via this API. Please note that the sent messages may be unread or read messages.

They are just messages that do not exist locally. For example, when a message has been read on another terminal and it is the last message of a conversation that can be obtained when you pull recent contacts, it will be called back through this method if it is not stored locally.

The IM SDK pulls offline messages after the user logs in. To prevent missing out message notifications, new message notifications are registered before login.

Declaration
public static void AddRecvNewMsgCallback(RecvNewMsgCallback callback)
Parameters
Type Name Description
RecvNewMsgCallback callback

CallExperimentalAPI(ExperimentalAPIReqeustParam, ValueCallback<ReponseInfo>)

An experimental API that developers usually do not use, such as an API for privatization.

Declaration
public static TIMResult CallExperimentalAPI(ExperimentalAPIReqeustParam json_param, ValueCallback<ReponseInfo> callback)
Parameters
Type Name Description
ExperimentalAPIReqeustParam json_param

ValueCallback<ReponseInfo> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

CallExperimentalAPI(ExperimentalAPIReqeustParam, ValueCallback<String>)

Declaration
public static TIMResult CallExperimentalAPI(ExperimentalAPIReqeustParam json_param, ValueCallback<string> callback)
Parameters
Type Name Description
ExperimentalAPIReqeustParam json_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

CallExperimentalAPICallback(Int32, String, ReponseInfo, String)

Declaration
public static void CallExperimentalAPICallback(int code, string desc, ReponseInfo data, string user_data)
Parameters
Type Name Description
System.Int32 code
System.String desc
ReponseInfo data
System.String user_data

ConvCancelDraft(String, TIMConvType)

Cancel conversation draft

Declaration
public static TIMResult ConvCancelDraft(string conv_id, TIMConvType conv_type)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

Returns
Type Description
TIMResult

TIMResult

ConvDelete(String, TIMConvType, ValueCallback<Object>)

Delete conversation

Declaration
public static TIMResult ConvDelete(string conv_id, TIMConvType conv_type, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ConvDelete(String, TIMConvType, ValueCallback<String>)

Declaration
public static TIMResult ConvDelete(string conv_id, TIMConvType conv_type, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ConvGetConvInfo(List<ConvParam>, ValueCallback<List<ConvInfo>>)

Get conversation information

Declaration
public static TIMResult ConvGetConvInfo(List<ConvParam> conv_list_param, ValueCallback<List<ConvInfo>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<ConvParam> conv_list_param

ValueCallback<System.Collections.Generic.List<ConvInfo>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ConvGetConvInfo(List<ConvParam>, ValueCallback<String>)

Declaration
public static TIMResult ConvGetConvInfo(List<ConvParam> conv_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<ConvParam> conv_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ConvGetConvList(ValueCallback<List<ConvInfo>>)

Get conversation list

Declaration
public static TIMResult ConvGetConvList(ValueCallback<List<ConvInfo>> callback)
Parameters
Type Name Description
ValueCallback<System.Collections.Generic.List<ConvInfo>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ConvGetConvList(ValueCallback<String>)

Declaration
public static TIMResult ConvGetConvList(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ConvGetTotalUnreadMessageCount(ValueCallback<GetTotalUnreadNumberResult>)

Get unread count of all conversations

Declaration
public static TIMResult ConvGetTotalUnreadMessageCount(ValueCallback<GetTotalUnreadNumberResult> callback)
Parameters
Type Name Description
ValueCallback<GetTotalUnreadNumberResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ConvGetTotalUnreadMessageCount(ValueCallback<String>)

Declaration
public static TIMResult ConvGetTotalUnreadMessageCount(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ConvPinConversation(String, TIMConvType, Boolean, ValueCallback<Object>)

Pin conversation to top

Declaration
public static TIMResult ConvPinConversation(string conv_id, TIMConvType conv_type, bool is_pinned, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

System.Boolean is_pinned

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ConvPinConversation(String, TIMConvType, Boolean, ValueCallback<String>)

Declaration
public static TIMResult ConvPinConversation(string conv_id, TIMConvType conv_type, bool is_pinned, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
System.Boolean is_pinned
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ConvSetDraft(String, TIMConvType, DraftParam)

Set conversation draft

Declaration
public static TIMResult ConvSetDraft(string conv_id, TIMConvType conv_type, DraftParam param)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

DraftParam param

DraftParam

Returns
Type Description
TIMResult

TIMResult

FriendshipAddFriend(FriendshipAddFriendParam, ValueCallback<FriendResult>)

Add friend

Declaration
public static TIMResult FriendshipAddFriend(FriendshipAddFriendParam param, ValueCallback<FriendResult> callback)
Parameters
Type Name Description
FriendshipAddFriendParam param

ValueCallback<FriendResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipAddFriend(FriendshipAddFriendParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipAddFriend(FriendshipAddFriendParam param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipAddFriendParam param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipAddToBlackList(List<String>, ValueCallback<List<FriendResult>>)

Delete group list

Declaration
public static TIMResult FriendshipAddToBlackList(List<string> json_add_to_blacklist_param, ValueCallback<List<FriendResult>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_add_to_blacklist_param
ValueCallback<System.Collections.Generic.List<FriendResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipAddToBlackList(List<String>, ValueCallback<String>)

Declaration
public static TIMResult FriendshipAddToBlackList(List<string> json_add_to_blacklist_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_add_to_blacklist_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipCheckFriendType(FriendshipCheckFriendTypeParam, ValueCallback<List<FriendshipCheckFriendTypeResult>>)

Verify friendship

Declaration
public static TIMResult FriendshipCheckFriendType(FriendshipCheckFriendTypeParam json_check_friend_list_param, ValueCallback<List<FriendshipCheckFriendTypeResult>> callback)
Parameters
Type Name Description
FriendshipCheckFriendTypeParam json_check_friend_list_param

ValueCallback<System.Collections.Generic.List<FriendshipCheckFriendTypeResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipCheckFriendType(FriendshipCheckFriendTypeParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipCheckFriendType(FriendshipCheckFriendTypeParam json_check_friend_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipCheckFriendTypeParam json_check_friend_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipCreateFriendGroup(FriendGroupInfo, ValueCallback<List<FriendResult>>)

Create friend group

Declaration
public static TIMResult FriendshipCreateFriendGroup(FriendGroupInfo json_create_friend_group_param, ValueCallback<List<FriendResult>> callback)
Parameters
Type Name Description
FriendGroupInfo json_create_friend_group_param

ValueCallback<System.Collections.Generic.List<FriendResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipCreateFriendGroup(FriendGroupInfo, ValueCallback<String>)

Declaration
public static TIMResult FriendshipCreateFriendGroup(FriendGroupInfo json_create_friend_group_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendGroupInfo json_create_friend_group_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipDeleteFriend(FriendshipDeleteFriendParam, ValueCallback<FriendResult>)

Delete friend

Declaration
public static TIMResult FriendshipDeleteFriend(FriendshipDeleteFriendParam json_delete_friend_param, ValueCallback<FriendResult> callback)
Parameters
Type Name Description
FriendshipDeleteFriendParam json_delete_friend_param

ValueCallback<FriendResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipDeleteFriend(FriendshipDeleteFriendParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipDeleteFriend(FriendshipDeleteFriendParam json_delete_friend_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipDeleteFriendParam json_delete_friend_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipDeleteFriendGroup(List<String>, ValueCallback<Object>)

Delete group list

Declaration
public static TIMResult FriendshipDeleteFriendGroup(List<string> json_delete_friend_group_param, ValueCallback<object> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_delete_friend_group_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipDeleteFriendGroup(List<String>, ValueCallback<String>)

Declaration
public static TIMResult FriendshipDeleteFriendGroup(List<string> json_delete_friend_group_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_delete_friend_group_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipDeleteFromBlackList(List<String>, ValueCallback<List<FriendResult>>)

Delete from blocklist

Declaration
public static TIMResult FriendshipDeleteFromBlackList(List<string> json_delete_from_blacklist_param, ValueCallback<List<FriendResult>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_delete_from_blacklist_param

ValueCallback<System.Collections.Generic.List<FriendResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipDeleteFromBlackList(List<String>, ValueCallback<String>)

Declaration
public static TIMResult FriendshipDeleteFromBlackList(List<string> json_delete_from_blacklist_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_delete_from_blacklist_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipDeletePendency(FriendshipDeletePendencyParam, ValueCallback<List<FriendResult>>)

Delete pending friend request

Declaration
public static TIMResult FriendshipDeletePendency(FriendshipDeletePendencyParam json_delete_pendency_param, ValueCallback<List<FriendResult>> callback)
Parameters
Type Name Description
FriendshipDeletePendencyParam json_delete_pendency_param

ValueCallback<System.Collections.Generic.List<FriendResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipDeletePendency(FriendshipDeletePendencyParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipDeletePendency(FriendshipDeletePendencyParam json_delete_pendency_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipDeletePendencyParam json_delete_pendency_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipGetBlackList(ValueCallback<List<FriendProfile>>)

Get blocklist

Declaration
public static TIMResult FriendshipGetBlackList(ValueCallback<List<FriendProfile>> callback)
Parameters
Type Name Description
ValueCallback<System.Collections.Generic.List<FriendProfile>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipGetBlackList(ValueCallback<String>)

Declaration
public static TIMResult FriendshipGetBlackList(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipGetFriendGroupList(List<String>, ValueCallback<List<FriendGroupInfo>>)

Get group list

Declaration
public static TIMResult FriendshipGetFriendGroupList(List<string> json_get_friend_group_list_param, ValueCallback<List<FriendGroupInfo>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_get_friend_group_list_param

ValueCallback<System.Collections.Generic.List<FriendGroupInfo>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipGetFriendGroupList(List<String>, ValueCallback<String>)

Declaration
public static TIMResult FriendshipGetFriendGroupList(List<string> json_get_friend_group_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_get_friend_group_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipGetFriendProfileList(ValueCallback<List<FriendProfile>>)

Get friend info

Declaration
public static TIMResult FriendshipGetFriendProfileList(ValueCallback<List<FriendProfile>> callback)
Parameters
Type Name Description
ValueCallback<System.Collections.Generic.List<FriendProfile>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipGetFriendProfileList(ValueCallback<String>)

Declaration
public static TIMResult FriendshipGetFriendProfileList(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipGetFriendsInfo(List<String>, ValueCallback<List<FriendInfoGetResult>>)

Search for friend

Declaration
public static TIMResult FriendshipGetFriendsInfo(List<string> json_get_friends_info_param, ValueCallback<List<FriendInfoGetResult>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_get_friends_info_param

ValueCallback<System.Collections.Generic.List<FriendInfoGetResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipGetFriendsInfo(List<String>, ValueCallback<String>)

Declaration
public static TIMResult FriendshipGetFriendsInfo(List<string> json_get_friends_info_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> json_get_friends_info_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipGetPendencyList(FriendshipGetPendencyListParam, ValueCallback<PendencyPage>)

Get pending friend request

Declaration
public static TIMResult FriendshipGetPendencyList(FriendshipGetPendencyListParam json_get_pendency_list_param, ValueCallback<PendencyPage> callback)
Parameters
Type Name Description
FriendshipGetPendencyListParam json_get_pendency_list_param

ValueCallback<PendencyPage> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipGetPendencyList(FriendshipGetPendencyListParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipGetPendencyList(FriendshipGetPendencyListParam json_get_pendency_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipGetPendencyListParam json_get_pendency_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipHandleFriendAddRequest(FriendRespone, ValueCallback<FriendResult>)

Handle friendship request

Declaration
public static TIMResult FriendshipHandleFriendAddRequest(FriendRespone json_handle_friend_add_param, ValueCallback<FriendResult> callback)
Parameters
Type Name Description
FriendRespone json_handle_friend_add_param
ValueCallback<FriendResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipHandleFriendAddRequest(FriendRespone, ValueCallback<String>)

Declaration
public static TIMResult FriendshipHandleFriendAddRequest(FriendRespone json_handle_friend_add_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendRespone json_handle_friend_add_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipModifyFriendGroup(FriendshipModifyFriendGroupParam, ValueCallback<List<FriendResult>>)

Modify group list

Declaration
public static TIMResult FriendshipModifyFriendGroup(FriendshipModifyFriendGroupParam json_modify_friend_group_param, ValueCallback<List<FriendResult>> callback)
Parameters
Type Name Description
FriendshipModifyFriendGroupParam json_modify_friend_group_param

ValueCallback<System.Collections.Generic.List<FriendResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipModifyFriendGroup(FriendshipModifyFriendGroupParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipModifyFriendGroup(FriendshipModifyFriendGroupParam json_modify_friend_group_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipModifyFriendGroupParam json_modify_friend_group_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipModifyFriendProfile(FriendshipModifyFriendProfileParam, ValueCallback<Object>)

Modify friend info

Declaration
public static TIMResult FriendshipModifyFriendProfile(FriendshipModifyFriendProfileParam json_modify_friend_info_param, ValueCallback<object> callback)
Parameters
Type Name Description
FriendshipModifyFriendProfileParam json_modify_friend_info_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipModifyFriendProfile(FriendshipModifyFriendProfileParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipModifyFriendProfile(FriendshipModifyFriendProfileParam json_modify_friend_info_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendshipModifyFriendProfileParam json_modify_friend_info_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipReportPendencyReaded(Int64, ValueCallback<Object>)

Report the reading of pending friend request

Declaration
public static TIMResult FriendshipReportPendencyReaded(long time_stamp, ValueCallback<object> callback)
Parameters
Type Name Description
System.Int64 time_stamp

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipReportPendencyReaded(Int64, ValueCallback<String>)

Declaration
public static TIMResult FriendshipReportPendencyReaded(long time_stamp, ValueCallback<string> callback)
Parameters
Type Name Description
System.Int64 time_stamp
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

FriendshipSearchFriends(FriendSearchParam, ValueCallback<List<FriendInfoGetResult>>)

Search for friend

Declaration
public static TIMResult FriendshipSearchFriends(FriendSearchParam json_search_friends_param, ValueCallback<List<FriendInfoGetResult>> callback)
Parameters
Type Name Description
FriendSearchParam json_search_friends_param

ValueCallback<System.Collections.Generic.List<FriendInfoGetResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

FriendshipSearchFriends(FriendSearchParam, ValueCallback<String>)

Declaration
public static TIMResult FriendshipSearchFriends(FriendSearchParam json_search_friends_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendSearchParam json_search_friends_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GetLoginStatus()

Get current login status

Declaration
public static TIMLoginStatus GetLoginStatus()
Returns
Type Description
TIMLoginStatus

TIMLoginStatus

GetLoginUserID(StringBuilder)

Get ID of the current login user

Declaration
public static TIMResult GetLoginUserID(StringBuilder user_id)
Parameters
Type Name Description
System.Text.StringBuilder user_id

Returns
Type Description
TIMResult

TIMResult

GetSDKVersion()

Initialize underlying library of the IM SDK

Declaration
public static string GetSDKVersion()
Returns
Type Description
System.String

string version

GetServerTime()

Get time at server (second)

Declaration
public static long GetServerTime()
Returns
Type Description
System.Int64

GroupCreate(CreateGroupParam, ValueCallback<CreateGroupResult>)

Create group

Declaration
public static TIMResult GroupCreate(CreateGroupParam group, ValueCallback<CreateGroupResult> callback)
Parameters
Type Name Description
CreateGroupParam group

ValueCallback<CreateGroupResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupCreate(CreateGroupParam, ValueCallback<String>)

Declaration
public static TIMResult GroupCreate(CreateGroupParam group, ValueCallback<string> callback)
Parameters
Type Name Description
CreateGroupParam group
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupDelete(String, ValueCallback<Object>)

Delete group

Declaration
public static TIMResult GroupDelete(string group_id, ValueCallback<object> callback)
Parameters
Type Name Description
System.String group_id

群ID

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupDelete(String, ValueCallback<String>)

Declaration
public static TIMResult GroupDelete(string group_id, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupDeleteGroupAttributes(String, List<String>, ValueCallback<Object>)

Delete custom group attributes

Declaration
public static TIMResult GroupDeleteGroupAttributes(string group_id, List<string> json_keys, ValueCallback<object> callback)
Parameters
Type Name Description
System.String group_id

群ID

System.Collections.Generic.List<System.String> json_keys

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupDeleteGroupAttributes(String, List<String>, ValueCallback<String>)

Declaration
public static TIMResult GroupDeleteGroupAttributes(string group_id, List<string> json_keys, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
System.Collections.Generic.List<System.String> json_keys
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupDeleteMember(GroupDeleteMemberParam, ValueCallback<List<GroupDeleteMemberResult>>)

Kick out group member

Declaration
public static TIMResult GroupDeleteMember(GroupDeleteMemberParam param, ValueCallback<List<GroupDeleteMemberResult>> callback)
Parameters
Type Name Description
GroupDeleteMemberParam param

ValueCallback<System.Collections.Generic.List<GroupDeleteMemberResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupDeleteMember(GroupDeleteMemberParam, ValueCallback<String>)

Declaration
public static TIMResult GroupDeleteMember(GroupDeleteMemberParam param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupDeleteMemberParam param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupGetGroupAttributes(String, List<String>, ValueCallback<List<GroupAttributes>>)

Delete custom group attributes

Declaration
public static TIMResult GroupGetGroupAttributes(string group_id, List<string> json_keys, ValueCallback<List<GroupAttributes>> callback)
Parameters
Type Name Description
System.String group_id

群ID

System.Collections.Generic.List<System.String> json_keys

ValueCallback<System.Collections.Generic.List<GroupAttributes>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupGetGroupAttributes(String, List<String>, ValueCallback<String>)

Declaration
public static TIMResult GroupGetGroupAttributes(string group_id, List<string> json_keys, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
System.Collections.Generic.List<System.String> json_keys
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupGetGroupInfoList(List<String>, ValueCallback<List<GetGroupInfoResult>>)

Get group info

Declaration
public static TIMResult GroupGetGroupInfoList(List<string> group_id_list, ValueCallback<List<GetGroupInfoResult>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> group_id_list

ValueCallback<System.Collections.Generic.List<GetGroupInfoResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupGetGroupInfoList(List<String>, ValueCallback<String>)

Declaration
public static TIMResult GroupGetGroupInfoList(List<string> group_id_list, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> group_id_list
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupGetJoinedGroupList(ValueCallback<List<GroupBaseInfo>>)

Get the list of groups the user has joined

Declaration
public static TIMResult GroupGetJoinedGroupList(ValueCallback<List<GroupBaseInfo>> callback)
Parameters
Type Name Description
ValueCallback<System.Collections.Generic.List<GroupBaseInfo>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupGetJoinedGroupList(ValueCallback<String>)

Declaration
public static TIMResult GroupGetJoinedGroupList(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupGetMemberInfoList(GroupGetMemberInfoListParam, ValueCallback<GroupGetMemberInfoListResult>)

Get group member info

Declaration
public static TIMResult GroupGetMemberInfoList(GroupGetMemberInfoListParam json_group_getmeminfos_param, ValueCallback<GroupGetMemberInfoListResult> callback)
Parameters
Type Name Description
GroupGetMemberInfoListParam json_group_getmeminfos_param

ValueCallback<GroupGetMemberInfoListResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupGetMemberInfoList(GroupGetMemberInfoListParam, ValueCallback<String>)

Declaration
public static TIMResult GroupGetMemberInfoList(GroupGetMemberInfoListParam json_group_getmeminfos_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupGetMemberInfoListParam json_group_getmeminfos_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupGetOnlineMemberCount(String, ValueCallback<GroupGetOnlineMemberCountResult>)

Get online users of a group

Declaration
public static TIMResult GroupGetOnlineMemberCount(string group_id, ValueCallback<GroupGetOnlineMemberCountResult> callback)
Parameters
Type Name Description
System.String group_id

群ID

ValueCallback<GroupGetOnlineMemberCountResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupGetOnlineMemberCount(String, ValueCallback<String>)

Declaration
public static TIMResult GroupGetOnlineMemberCount(string group_id, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupGetPendencyList(GroupPendencyOption, ValueCallback<GroupPendencyResult>)

Get the list of pending group requests

Declaration
public static TIMResult GroupGetPendencyList(GroupPendencyOption json_group_getpendence_list_param, ValueCallback<GroupPendencyResult> callback)
Parameters
Type Name Description
GroupPendencyOption json_group_getpendence_list_param

ValueCallback<GroupPendencyResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupGetPendencyList(GroupPendencyOption, ValueCallback<String>)

Declaration
public static TIMResult GroupGetPendencyList(GroupPendencyOption json_group_getpendence_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupPendencyOption json_group_getpendence_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupHandlePendency(GroupHandlePendencyParam, ValueCallback<Object>)

Handle pending group requests

Declaration
public static TIMResult GroupHandlePendency(GroupHandlePendencyParam json_group_handle_pendency_param, ValueCallback<object> callback)
Parameters
Type Name Description
GroupHandlePendencyParam json_group_handle_pendency_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupHandlePendency(GroupHandlePendencyParam, ValueCallback<String>)

Declaration
public static TIMResult GroupHandlePendency(GroupHandlePendencyParam json_group_handle_pendency_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupHandlePendencyParam json_group_handle_pendency_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupInitGroupAttributes(String, GroupAttributes, ValueCallback<Object>)

Initialize custom group attributes

Declaration
public static TIMResult GroupInitGroupAttributes(string group_id, GroupAttributes json_group_atrributes, ValueCallback<object> callback)
Parameters
Type Name Description
System.String group_id

群ID

GroupAttributes json_group_atrributes

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupInitGroupAttributes(String, GroupAttributes, ValueCallback<String>)

Declaration
public static TIMResult GroupInitGroupAttributes(string group_id, GroupAttributes json_group_atrributes, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
GroupAttributes json_group_atrributes
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupInviteMember(GroupInviteMemberParam, ValueCallback<List<GroupInviteMemberResult>>)

Invite user to join group

Declaration
public static TIMResult GroupInviteMember(GroupInviteMemberParam param, ValueCallback<List<GroupInviteMemberResult>> callback)
Parameters
Type Name Description
GroupInviteMemberParam param

ValueCallback<System.Collections.Generic.List<GroupInviteMemberResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupInviteMember(GroupInviteMemberParam, ValueCallback<String>)

Declaration
public static TIMResult GroupInviteMember(GroupInviteMemberParam param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupInviteMemberParam param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupJoin(String, String, ValueCallback<Object>)

Join group

Declaration
public static TIMResult GroupJoin(string group_id, string hello_message, ValueCallback<object> callback)
Parameters
Type Name Description
System.String group_id

群ID

System.String hello_message

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupJoin(String, String, ValueCallback<String>)

Declaration
public static TIMResult GroupJoin(string group_id, string hello_message, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
System.String hello_message
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupModifyGroupInfo(GroupModifyInfoParam, ValueCallback<Object>)

Modify group info

Declaration
public static TIMResult GroupModifyGroupInfo(GroupModifyInfoParam json_group_modifyinfo_param, ValueCallback<object> callback)
Parameters
Type Name Description
GroupModifyInfoParam json_group_modifyinfo_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupModifyGroupInfo(GroupModifyInfoParam, ValueCallback<String>)

Declaration
public static TIMResult GroupModifyGroupInfo(GroupModifyInfoParam json_group_modifyinfo_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupModifyInfoParam json_group_modifyinfo_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupModifyMemberInfo(GroupModifyMemberInfoParam, ValueCallback<Object>)

Modify group member info

Declaration
public static TIMResult GroupModifyMemberInfo(GroupModifyMemberInfoParam json_group_modifymeminfo_param, ValueCallback<object> callback)
Parameters
Type Name Description
GroupModifyMemberInfoParam json_group_modifymeminfo_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupModifyMemberInfo(GroupModifyMemberInfoParam, ValueCallback<String>)

Declaration
public static TIMResult GroupModifyMemberInfo(GroupModifyMemberInfoParam json_group_modifymeminfo_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupModifyMemberInfoParam json_group_modifymeminfo_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupQuit(String, ValueCallback<Object>)

Quit group

Declaration
public static TIMResult GroupQuit(string group_id, ValueCallback<object> callback)
Parameters
Type Name Description
System.String group_id

群ID

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupQuit(String, ValueCallback<String>)

Declaration
public static TIMResult GroupQuit(string group_id, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupReportPendencyReaded(Int64, ValueCallback<Object>)

Report the reading of pending group requests

Declaration
public static TIMResult GroupReportPendencyReaded(long time_stamp, ValueCallback<object> callback)
Parameters
Type Name Description
System.Int64 time_stamp

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupReportPendencyReaded(Int64, ValueCallback<String>)

Declaration
public static TIMResult GroupReportPendencyReaded(long time_stamp, ValueCallback<string> callback)
Parameters
Type Name Description
System.Int64 time_stamp
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupSearchGroupMembers(GroupMemberSearchParam, ValueCallback<List<GroupGetOnlineMemberCountResult>>)

Search for group member

Declaration
public static TIMResult GroupSearchGroupMembers(GroupMemberSearchParam json_group_search_group_members_param, ValueCallback<List<GroupGetOnlineMemberCountResult>> callback)
Parameters
Type Name Description
GroupMemberSearchParam json_group_search_group_members_param

ValueCallback<System.Collections.Generic.List<GroupGetOnlineMemberCountResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupSearchGroupMembers(GroupMemberSearchParam, ValueCallback<String>)

Declaration
public static TIMResult GroupSearchGroupMembers(GroupMemberSearchParam json_group_search_group_members_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupMemberSearchParam json_group_search_group_members_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

GroupSearchGroups(GroupSearchParam, ValueCallback<List<GroupDetailInfo>>)

Get online users of a group

Declaration
public static TIMResult GroupSearchGroups(GroupSearchParam json_group_search_groups_param, ValueCallback<List<GroupDetailInfo>> callback)
Parameters
Type Name Description
GroupSearchParam json_group_search_groups_param
ValueCallback<System.Collections.Generic.List<GroupDetailInfo>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

GroupSearchGroups(GroupSearchParam, ValueCallback<String>)

Declaration
public static TIMResult GroupSearchGroups(GroupSearchParam json_group_search_groups_param, ValueCallback<string> callback)
Parameters
Type Name Description
GroupSearchParam json_group_search_groups_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

Init(Int64, SdkConfig)

Initialize IM SDK

Declaration
public static TIMResult Init(long sdk_app_id, SdkConfig json_sdk_config)
Parameters
Type Name Description
System.Int64 sdk_app_id

SdkConfig json_sdk_config

SdkConfig

Returns
Type Description
TIMResult

TIMResult

Login(String, String, ValueCallback<Object>)

Log in

Declaration
public static TIMResult Login(string user_id, string user_sig, ValueCallback<object> callback)
Parameters
Type Name Description
System.String user_id

用户ID

System.String user_sig

Generated using `sdk_app_id` and `secret`. See https://cloud.tencent.com/document/product/269/32688

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

Login(String, String, ValueCallback<String>)

Declaration
public static TIMResult Login(string user_id, string user_sig, ValueCallback<string> callback)
Parameters
Type Name Description
System.String user_id
System.String user_sig
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

Logout(ValueCallback<Object>)

Log out

Declaration
public static TIMResult Logout(ValueCallback<object> callback)
Parameters
Type Name Description
ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

Logout(ValueCallback<String>)

Declaration
public static TIMResult Logout(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgBatchSend(MsgBatchSendParam, ValueCallback<List<MsgBatchSendResult>>)

Batch send messages

Declaration
public static TIMResult MsgBatchSend(MsgBatchSendParam json_batch_send_param, ValueCallback<List<MsgBatchSendResult>> callback)
Parameters
Type Name Description
MsgBatchSendParam json_batch_send_param

ValueCallback<System.Collections.Generic.List<MsgBatchSendResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgBatchSend(MsgBatchSendParam, ValueCallback<String>)

Declaration
public static TIMResult MsgBatchSend(MsgBatchSendParam json_batch_send_param, ValueCallback<string> callback)
Parameters
Type Name Description
MsgBatchSendParam json_batch_send_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgCancelSend(String, TIMConvType, String, ValueCallback<Message>)

Cancel message sending

Declaration
public static TIMResult MsgCancelSend(string conv_id, TIMConvType conv_type, string message_id, ValueCallback<Message> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

System.String message_id

ValueCallback<Message> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgCancelSend(String, TIMConvType, String, ValueCallback<String>)

Declaration
public static TIMResult MsgCancelSend(string conv_id, TIMConvType conv_type, string message_id, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
System.String message_id
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgClearHistoryMessage(String, TIMConvType, ValueCallback<Object>)

Clear message history

Declaration
public static TIMResult MsgClearHistoryMessage(string conv_id, TIMConvType conv_type, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgClearHistoryMessage(String, TIMConvType, ValueCallback<String>)

Declaration
public static TIMResult MsgClearHistoryMessage(string conv_id, TIMConvType conv_type, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgDelete(String, TIMConvType, MsgDeleteParam, ValueCallback<Object>)

Delete message

Declaration
public static TIMResult MsgDelete(string conv_id, TIMConvType conv_type, MsgDeleteParam message_delete_param, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

MsgDeleteParam message_delete_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgDelete(String, TIMConvType, MsgDeleteParam, ValueCallback<String>)

Declaration
public static TIMResult MsgDelete(string conv_id, TIMConvType conv_type, MsgDeleteParam message_delete_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
MsgDeleteParam message_delete_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgDoBackground(Int32, ValueCallback<Object>)

The APP can call this interface when it detects that the application has exited the background. It can be used as the initial unread number of the desktop application icon (for iOS and Android platforms).

Declaration
public static TIMResult MsgDoBackground(int unread_count, ValueCallback<object> callback)
Parameters
Type Name Description
System.Int32 unread_count

unread_count

ValueCallback<System.Object> callback

ValueCallback

Returns
Type Description
TIMResult

TIMResult

MsgDoBackground(Int32, ValueCallback<String>)

Declaration
public static TIMResult MsgDoBackground(int unread_count, ValueCallback<string> callback)
Parameters
Type Name Description
System.Int32 unread_count
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgDoForeground(ValueCallback<Object>)

The APP can call this interface when it detects that the application has entered the foreground (for iOS and Android platforms).

Declaration
public static TIMResult MsgDoForeground(ValueCallback<object> callback)
Parameters
Type Name Description
ValueCallback<System.Object> callback

ValueCallback

Returns
Type Description
TIMResult

TIMResult

MsgDoForeground(ValueCallback<String>)

Declaration
public static TIMResult MsgDoForeground(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgDownloadElemToPath(DownloadElemParam, String, ValueCallback<MsgDownloadElemResult>)

Download multi-media message

Declaration
public static TIMResult MsgDownloadElemToPath(DownloadElemParam download_param, string path, ValueCallback<MsgDownloadElemResult> callback)
Parameters
Type Name Description
DownloadElemParam download_param

System.String path

ValueCallback<MsgDownloadElemResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgDownloadElemToPath(DownloadElemParam, String, ValueCallback<String>)

Declaration
public static TIMResult MsgDownloadElemToPath(DownloadElemParam download_param, string path, ValueCallback<string> callback)
Parameters
Type Name Description
DownloadElemParam download_param
System.String path
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgDownloadMergerMessage(Message, ValueCallback<List<Message>>)

Download combined message

Declaration
public static TIMResult MsgDownloadMergerMessage(Message message, ValueCallback<List<Message>> callback)
Parameters
Type Name Description
Message message

ValueCallback<System.Collections.Generic.List<Message>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgDownloadMergerMessage(Message, ValueCallback<String>)

Declaration
public static TIMResult MsgDownloadMergerMessage(Message message, ValueCallback<string> callback)
Parameters
Type Name Description
Message message
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgFindByMsgLocatorList(String, TIMConvType, MsgLocator, ValueCallback<List<Message>>)

Locate message with a message locator

Declaration
public static TIMResult MsgFindByMsgLocatorList(string conv_id, TIMConvType conv_type, MsgLocator message_locator, ValueCallback<List<Message>> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

MsgLocator message_locator

ValueCallback<System.Collections.Generic.List<Message>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgFindByMsgLocatorList(String, TIMConvType, MsgLocator, ValueCallback<String>)

Declaration
public static TIMResult MsgFindByMsgLocatorList(string conv_id, TIMConvType conv_type, MsgLocator message_locator, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
MsgLocator message_locator
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgFindMessages(List<String>, ValueCallback<List<Message>>)

Locate local message

Declaration
public static TIMResult MsgFindMessages(List<string> message_id_array, ValueCallback<List<Message>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> message_id_array

ValueCallback<System.Collections.Generic.List<Message>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgFindMessages(List<String>, ValueCallback<String>)

Declaration
public static TIMResult MsgFindMessages(List<string> message_id_array, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> message_id_array
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgGetC2CReceiveMessageOpt(List<String>, ValueCallback<List<GetC2CRecvMsgOptResult>>)

Set C2C message receiving option

Declaration
public static TIMResult MsgGetC2CReceiveMessageOpt(List<string> user_id_list, ValueCallback<List<GetC2CRecvMsgOptResult>> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> user_id_list

ValueCallback<System.Collections.Generic.List<GetC2CRecvMsgOptResult>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgGetC2CReceiveMessageOpt(List<String>, ValueCallback<String>)

Declaration
public static TIMResult MsgGetC2CReceiveMessageOpt(List<string> user_id_list, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> user_id_list
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgGetMsgList(String, TIMConvType, MsgGetMsgListParam, ValueCallback<List<Message>>)

Get message history list

Declaration
public static TIMResult MsgGetMsgList(string conv_id, TIMConvType conv_type, MsgGetMsgListParam get_message_list_param, ValueCallback<List<Message>> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

MsgGetMsgListParam get_message_list_param

ValueCallback<System.Collections.Generic.List<Message>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgGetMsgList(String, TIMConvType, MsgGetMsgListParam, ValueCallback<String>)

Declaration
public static TIMResult MsgGetMsgList(string conv_id, TIMConvType conv_type, MsgGetMsgListParam get_message_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
MsgGetMsgListParam get_message_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgImportMsgList(String, TIMConvType, List<Message>, ValueCallback<Object>)

Import message

Declaration
public static TIMResult MsgImportMsgList(string conv_id, TIMConvType conv_type, List<Message> message_list, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

System.Collections.Generic.List<Message> message_list

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgImportMsgList(String, TIMConvType, List<Message>, ValueCallback<String>)

Declaration
public static TIMResult MsgImportMsgList(string conv_id, TIMConvType conv_type, List<Message> message_list, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
System.Collections.Generic.List<Message> message_list
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgListDelete(String, TIMConvType, List<Message>, ValueCallback<Object>)

Delete message

Declaration
public static TIMResult MsgListDelete(string conv_id, TIMConvType conv_type, List<Message> message_list, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

System.Collections.Generic.List<Message> message_list
ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgListDelete(String, TIMConvType, List<Message>, ValueCallback<String>)

Declaration
public static TIMResult MsgListDelete(string conv_id, TIMConvType conv_type, List<Message> message_list, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
System.Collections.Generic.List<Message> message_list
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgMarkAllMessageAsRead(ValueCallback<Object>)

Mark all messages as read

Declaration
public static TIMResult MsgMarkAllMessageAsRead(ValueCallback<object> callback)
Parameters
Type Name Description
ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgMarkAllMessageAsRead(ValueCallback<String>)

Declaration
public static TIMResult MsgMarkAllMessageAsRead(ValueCallback<string> callback)
Parameters
Type Name Description
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgReportReaded(String, TIMConvType, Message, ValueCallback<Object>)

Report the reading of message

Declaration
public static TIMResult MsgReportReaded(string conv_id, TIMConvType conv_type, Message message, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

Message message

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgReportReaded(String, TIMConvType, Message, ValueCallback<String>)

Declaration
public static TIMResult MsgReportReaded(string conv_id, TIMConvType conv_type, Message message, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
Message message
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgRevoke(String, TIMConvType, Message, ValueCallback<Object>)

Recall message

Declaration
public static TIMResult MsgRevoke(string conv_id, TIMConvType conv_type, Message message, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

Message message

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgRevoke(String, TIMConvType, Message, ValueCallback<String>)

Declaration
public static TIMResult MsgRevoke(string conv_id, TIMConvType conv_type, Message message, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
Message message
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSaveMsg(String, TIMConvType, Message, ValueCallback<Object>)

Save message

Declaration
public static TIMResult MsgSaveMsg(string conv_id, TIMConvType conv_type, Message message, ValueCallback<object> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

Message message

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgSaveMsg(String, TIMConvType, Message, ValueCallback<String>)

Declaration
public static TIMResult MsgSaveMsg(string conv_id, TIMConvType conv_type, Message message, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
Message message
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSearchLocalMessages(MessageSearchParam, ValueCallback<MessageSearchResult>)

Search for local message

Declaration
public static TIMResult MsgSearchLocalMessages(MessageSearchParam message_search_param, ValueCallback<MessageSearchResult> callback)
Parameters
Type Name Description
MessageSearchParam message_search_param

ValueCallback<MessageSearchResult> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgSearchLocalMessages(MessageSearchParam, ValueCallback<String>)

Declaration
public static TIMResult MsgSearchLocalMessages(MessageSearchParam message_search_param, ValueCallback<string> callback)
Parameters
Type Name Description
MessageSearchParam message_search_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSendMessage(String, TIMConvType, Message, StringBuilder, ValueCallback<Message>)

Send message

Declaration
public static TIMResult MsgSendMessage(string conv_id, TIMConvType conv_type, Message message, StringBuilder message_id, ValueCallback<Message> callback)
Parameters
Type Name Description
System.String conv_id

TIMConvType conv_type

Message message

System.Text.StringBuilder message_id

ValueCallback<Message> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgSendMessage(String, TIMConvType, Message, StringBuilder, ValueCallback<String>)

Declaration
public static TIMResult MsgSendMessage(string conv_id, TIMConvType conv_type, Message message, StringBuilder message_id, ValueCallback<string> callback)
Parameters
Type Name Description
System.String conv_id
TIMConvType conv_type
Message message
System.Text.StringBuilder message_id
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSetC2CReceiveMessageOpt(List<String>, TIMReceiveMessageOpt, ValueCallback<Object>)

Set message receiving option

Declaration
public static TIMResult MsgSetC2CReceiveMessageOpt(List<string> user_id_list, TIMReceiveMessageOpt opt, ValueCallback<object> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> user_id_list

TIMReceiveMessageOpt opt

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgSetC2CReceiveMessageOpt(List<String>, TIMReceiveMessageOpt, ValueCallback<String>)

Declaration
public static TIMResult MsgSetC2CReceiveMessageOpt(List<string> user_id_list, TIMReceiveMessageOpt opt, ValueCallback<string> callback)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> user_id_list
TIMReceiveMessageOpt opt
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSetGroupReceiveMessageOpt(String, TIMReceiveMessageOpt, ValueCallback<Object>)

Set group message receiving option

Declaration
public static TIMResult MsgSetGroupReceiveMessageOpt(string group_id, TIMReceiveMessageOpt opt, ValueCallback<object> callback)
Parameters
Type Name Description
System.String group_id

TIMReceiveMessageOpt opt

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgSetGroupReceiveMessageOpt(String, TIMReceiveMessageOpt, ValueCallback<String>)

Declaration
public static TIMResult MsgSetGroupReceiveMessageOpt(string group_id, TIMReceiveMessageOpt opt, ValueCallback<string> callback)
Parameters
Type Name Description
System.String group_id
TIMReceiveMessageOpt opt
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSetLocalCustomData(Message, ValueCallback<Object>)

Set local message data

Declaration
public static TIMResult MsgSetLocalCustomData(Message message, ValueCallback<object> callback)
Parameters
Type Name Description
Message message

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

MsgSetLocalCustomData(Message, ValueCallback<String>)

Declaration
public static TIMResult MsgSetLocalCustomData(Message message, ValueCallback<string> callback)
Parameters
Type Name Description
Message message
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

MsgSetOfflinePushToken(OfflinePushToken, ValueCallback<Object>)

Set up offline push configuration information (for iOS and Android platforms)

Declaration
public static TIMResult MsgSetOfflinePushToken(OfflinePushToken json_token, ValueCallback<object> callback)
Parameters
Type Name Description
OfflinePushToken json_token
ValueCallback<System.Object> callback

ValueCallback

Returns
Type Description
TIMResult

TIMResult

MsgSetOfflinePushToken(OfflinePushToken, ValueCallback<String>)

Declaration
public static TIMResult MsgSetOfflinePushToken(OfflinePushToken json_token, ValueCallback<string> callback)
Parameters
Type Name Description
OfflinePushToken json_token
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ProfileGetUserProfileList(FriendShipGetProfileListParam, ValueCallback<List<UserProfile>>)

Get user list information

Declaration
public static TIMResult ProfileGetUserProfileList(FriendShipGetProfileListParam json_get_user_profile_list_param, ValueCallback<List<UserProfile>> callback)
Parameters
Type Name Description
FriendShipGetProfileListParam json_get_user_profile_list_param

ValueCallback<System.Collections.Generic.List<UserProfile>> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ProfileGetUserProfileList(FriendShipGetProfileListParam, ValueCallback<String>)

Declaration
public static TIMResult ProfileGetUserProfileList(FriendShipGetProfileListParam json_get_user_profile_list_param, ValueCallback<string> callback)
Parameters
Type Name Description
FriendShipGetProfileListParam json_get_user_profile_list_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

ProfileModifySelfUserProfile(UserProfileItem, ValueCallback<Object>)

Modify your profile

Declaration
public static TIMResult ProfileModifySelfUserProfile(UserProfileItem json_modify_self_user_profile_param, ValueCallback<object> callback)
Parameters
Type Name Description
UserProfileItem json_modify_self_user_profile_param

ValueCallback<System.Object> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

ProfileModifySelfUserProfile(UserProfileItem, ValueCallback<String>)

Declaration
public static TIMResult ProfileModifySelfUserProfile(UserProfileItem json_modify_self_user_profile_param, ValueCallback<string> callback)
Parameters
Type Name Description
UserProfileItem json_modify_self_user_profile_param
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

RemoveRecvNewMsgCallback()

Remove the callback for receiving new message

Declaration
public static void RemoveRecvNewMsgCallback()

SetConfig(SetConfig, ValueCallback<SetConfig>)

Set global configuration

Declaration
public static TIMResult SetConfig(SetConfig config, ValueCallback<SetConfig> callback)
Parameters
Type Name Description
SetConfig config

configure

ValueCallback<SetConfig> callback

Asynchronous callback

Returns
Type Description
TIMResult

TIMResult

SetConfig(SetConfig, ValueCallback<String>)

Declaration
public static TIMResult SetConfig(SetConfig config, ValueCallback<string> callback)
Parameters
Type Name Description
SetConfig config
ValueCallback<System.String> callback
Returns
Type Description
TIMResult

SetConvEventCallback(ConvEventCallback)

Set conversation event callback

Conversation events include:

Conversation creation

Conversation deletion

Conversation update

Conversation start

Conversation end

Any operation that generates a new conversation will trigger a conversation creation event, such as calling the API [TIMConvCreate]() to create a conversation, and receiving the first message from an unknown conversation.

Any operation that changes an existing conversation will trigger a conversation update event, such as receiving new messages of a conversation, message recalling, and reporting the read status.

When you call the API [TIMConvDelete]() to delete a conversation, successful deletion will trigger a conversation deletion event.

Declaration
public static void SetConvEventCallback(ConvEventCallback callback)
Parameters
Type Name Description
ConvEventCallback callback

SetConvTotalUnreadMessageCountChangedCallback(ConvTotalUnreadMessageCountChangedCallback)

Set the callback for the unread message count update of a conversation

Declaration
public static void SetConvTotalUnreadMessageCountChangedCallback(ConvTotalUnreadMessageCountChangedCallback callback)
Parameters
Type Name Description
ConvTotalUnreadMessageCountChangedCallback callback

SetFriendAddRequestCallback(FriendAddRequestCallback)

Set the callback for friend request

If the current login user has set confirmation for friend requests and another user sends a friend request to this user, the current login user will receive the friend request callback, and the IM SDK will notify the developer using this callback. If the same account has logged in on multiple terminals, each terminal will receive the callback.

Declaration
public static void SetFriendAddRequestCallback(FriendAddRequestCallback callback)
Parameters
Type Name Description
FriendAddRequestCallback callback

SetFriendApplicationListDeletedCallback(FriendApplicationListDeletedCallback)

Set the callback for friend request deletion

1. Proactively delete a friend request

2. Refuse a friend request

3. Agree to a friend request

4. Receive refusal of a friend request to another user

Declaration
public static void SetFriendApplicationListDeletedCallback(FriendApplicationListDeletedCallback callback)
Parameters
Type Name Description
FriendApplicationListDeletedCallback callback

SetFriendApplicationListReadCallback(FriendApplicationListReadCallback)

Set the callback for read friend request

If you call `setFriendApplicationRead` to set the friend requests as read, you will receive this callback (mainly used for multi-client synchronization).

Declaration
public static void SetFriendApplicationListReadCallback(FriendApplicationListReadCallback callback)
Parameters
Type Name Description
FriendApplicationListReadCallback callback

SetFriendBlackListAddedCallback(FriendBlackListAddedCallback)

Set the callback for adding a user to the blocklist

Declaration
public static void SetFriendBlackListAddedCallback(FriendBlackListAddedCallback callback)
Parameters
Type Name Description
FriendBlackListAddedCallback callback

SetFriendBlackListDeletedCallback(FriendBlackListDeletedCallback)

Set the callback for removing a user from the blocklist

Declaration
public static void SetFriendBlackListDeletedCallback(FriendBlackListDeletedCallback callback)
Parameters
Type Name Description
FriendBlackListDeletedCallback callback

SetGroupAttributeChangedCallback(GroupAttributeChangedCallback)

Set the callback for group attribute changes

If the attributes of a group you have joined are modified, all attributes of the group are returned (all members of the group can receive them).

Declaration
public static void SetGroupAttributeChangedCallback(GroupAttributeChangedCallback callback)
Parameters
Type Name Description
GroupAttributeChangedCallback callback

SetGroupTipsEventCallback(GroupTipsEventCallback)

Set the callback for group system messages

Group system message events include joining a group, leaving a group, being kicked out of a group, setting an admin, canceling an admin, modifying group information, and modifying group member information. These messages are sent to all group members.

Declaration
public static void SetGroupTipsEventCallback(GroupTipsEventCallback callback)
Parameters
Type Name Description
GroupTipsEventCallback callback

SetKickedOfflineCallback(KickedOfflineCallback)

Set the callback for kicked-offline notifications

If a user has logged in on another terminal, the user will be kicked offline and receive a kicked-offline notification. The common way to handle this is to inform the user to log out or kick the account on the other terminal offline.

If the user is logged out when offline, the subsequent login will fail. A strong alert (login error code ERR_IMSDK_KICKED_BY_OTHERS: 6208) can be displayed to the user. Developers can also ignore this error and let the user log in again.

Being kicked offline in online status:

A user logs in on device 1, stays online, and logs in on device 2. In this case, the user will be forcibly logged out on device 1 and receive the `KickedOfflineCallback` callback.

After receiving the callback on device 1, the user will be notified that they can log in by calling `login` and kick device 2 offline. This is the process of being kicked offline in the online status.

Being kicked offline in offline status:

A user logs in on device 1 and exits the process without logging out on device 1. The user then logs in on device 2. As the user is offline on device 1, the user will not detect this event.

To explicitly notify the user of the event, the system will return the error code ERR_IMSDK_KICKED_BY_OTHERS: 6208 when the user logs in on device 1 again. This error code indicates that the user was kicked offline, and the user needs to determine whether to go offline on the other device.

If yes, the user can call `login` again to log in forcibly, and the instance online on device 2 will receive `TIMKickedOfflineCallback`.

Declaration
public static void SetKickedOfflineCallback(KickedOfflineCallback callback)
Parameters
Type Name Description
KickedOfflineCallback callback

SetLogCallback(LogCallback)

Set the callback for logs

After the log listener callback is set, the internal IM SDK logs will be returned to the callback function set by this API.

Developers can call the SetConfig() API to configure the log levels of logs to be returned to the callback function.

Declaration
public static void SetLogCallback(LogCallback callback)
Parameters
Type Name Description
LogCallback callback

SetMsgElemUploadProgressCallback(MsgElemUploadProgressCallback)

Set the callback for the upload progress of message element files

This is used to set the callback for the message element upload progress. When a message contains image, audio, file, or video elements, the IM SDK will upload these files and trigger the callback set via this API. The user can learn the upload progress based on the callback.

Declaration
public static void SetMsgElemUploadProgressCallback(MsgElemUploadProgressCallback callback)
Parameters
Type Name Description
MsgElemUploadProgressCallback callback

SetMsgReadedReceiptCallback(MsgReadedReceiptCallback)

Set the callback for message read receipts

When the sender sends a message, the recipient calls the [TIMMsgReportReaded]() API to report that the message has been read. The IM SDK at the sender's end will send the receipt using the callback set via this API.

Declaration
public static void SetMsgReadedReceiptCallback(MsgReadedReceiptCallback callback)
Parameters
Type Name Description
MsgReadedReceiptCallback callback

SetMsgRevokeCallback(MsgRevokeCallback)

Set the callback for message recalls

If the sender calls the [TIMMsgRevoke]() API to recall a message that is sent to the recipient, the IM SDK at the recipient's end will send a message recall notification using the callback set via this API.

Declaration
public static void SetMsgRevokeCallback(MsgRevokeCallback callback)
Parameters
Type Name Description
MsgRevokeCallback callback

SetMsgUpdateCallback(MsgUpdateCallback)

Set the callback for message update notifications returned after messages are modified in the cloud

If a message you sent is modified on the server end, the IM SDK will notify you using this callback.

You can intercept all IM messages on your server. For more information, see [Invoke a Callback Before Sending One-to-One Messages](https://cloud.tencent.com/document/product/269/1632).

After this callback is set, the IM server will notify your business server of each message sent by your users.

Your business server can modify the messages (for example, filter sensitive words). If your server modifies a message, the IM SDK will notify you using this callback.

Declaration
public static void SetMsgUpdateCallback(MsgUpdateCallback callback)
Parameters
Type Name Description
MsgUpdateCallback callback

SetNetworkStatusListenerCallback(NetworkStatusListenerCallback)

Set the callback for network connection status listener

When you call the Init() API, the IM SDK will connect the Tencent Cloud backend. The callback set by this API listens for the network connection status.

Network connection status options include connecting, connection failed, connection successful, and connected. A network event does not indicate the user's local network status but only indicates the connection of the IM SDK to the IM cloud server.

This callback is optional. To allow users to detect whether the IM SDK is connected to the server, set this callback function. It notifies the caller whether the IM SDK is connected to or disconnected from the communication backend. If the network connection is interrupted, the IM SDK will reconnect to the network after the network recovers and automatically fetch messages to notify the caller. The caller does not need to be concerned about the network status. This callback function is for notification only.

If a user has logged in, the IM SDK will reconnect to the network after the network recovers.

Declaration
public static void SetNetworkStatusListenerCallback(NetworkStatusListenerCallback callback)
Parameters
Type Name Description
NetworkStatusListenerCallback callback

SetOnAddFriendCallback(OnAddFriendCallback)

Set the callback for adding friends

This callback is used for multi-terminal synchronization. For example, the same IM SDK account has logged in on devices A and B. When you add a friend on device A, the IM SDK on device B will receive a friend addition notification and notify the developer using this callback.

Declaration
public static void SetOnAddFriendCallback(OnAddFriendCallback callback)
Parameters
Type Name Description
OnAddFriendCallback callback

SetOnDeleteFriendCallback(OnDeleteFriendCallback)

Set the callback for friend deletion

This callback is used for multi-terminal synchronization. For example, the same IM SDK account has logged in on devices A and B. When you delete a friend on device A, the IM SDK on device B will receive a friend deletion notification and notify the developer via this callback.

Declaration
public static void SetOnDeleteFriendCallback(OnDeleteFriendCallback callback)
Parameters
Type Name Description
OnDeleteFriendCallback callback

SetUpdateFriendProfileCallback(UpdateFriendProfileCallback)

Set the callback for friend profile update

This callback is used for multi-terminal synchronization. For example, the same IM SDK account has logged in on devices A and B. When a friend's profile is updated on device A, the IM SDK on device B will receive a friend profile update notification and notify the developer via this callback.

Declaration
public static void SetUpdateFriendProfileCallback(UpdateFriendProfileCallback callback)
Parameters
Type Name Description
UpdateFriendProfileCallback callback

SetUserSigExpiredCallback(UserSigExpiredCallback)

Set the callback for ticket expiration

User tickets may expire. If a user ticket expires, the callback function set by this API will be called.

Login() will return the error code 70001. Developers can change the ticket based on the error code or ticket expiration callback.

Declaration
public static void SetUserSigExpiredCallback(UserSigExpiredCallback callback)
Parameters
Type Name Description
UserSigExpiredCallback callback

TIMMsgUpdateCallbackInstance(IntPtr, IntPtr)

Declaration
public static void TIMMsgUpdateCallbackInstance(IntPtr json_msg_array, IntPtr user_data)
Parameters
Type Name Description
System.IntPtr json_msg_array
System.IntPtr user_data

Uninit()

Uninitialize IM SDK

Declaration
public static TIMResult Uninit()
Returns
Type Description
TIMResult

TIMResult

In This Article
Back to top Generated by DocFX