Key IM SDK Types

Last updated: 2020-08-03 11:17:36

    Common Macro and Basic Configuration Options


    Values returned after an API is called.

    Name Description
    TIM_SUCC API called successfully
    TIM_ERR_SDKUNINIT Failed to call the API because the IM SDK is not initialized.
    TIM_ERR_NOTLOGIN Failed to call the API because the user did not log in.
    TIM_ERR_JSON Failed to call the API because the JSON format or JSON Key is incorrect.
    TIM_ERR_PARAM Failed to call the API because parameters are incorrect.
    TIM_ERR_CONV Failed to call the API because the session is invalid.
    TIM_ERR_GROUP Failed to call the API because the group is invalid.


    If a callback exists in the API parameters, the callback is called only when the API returns a TIM_SUCC message.


    Log level.

    Name Description
    kTIMLog_Off Disables log output.
    kTIMLog_Test Full log
    kTIMLog_Verbose Log for detailed information during development and debugging
    kTIMLog_Debug Debugging log
    kTIMLog_Info Information log
    kTIMLog_Warn Alarm log
    kTIMLog_Error Error log
    kTIMLog_Assert Assertion log


    Connection event type.

    Name Description
    kTIMConnected Connected
    kTIMDisconnected Disconnected
    kTIMConnecting Connecting
    kTIMConnectFailed Failed to connect


    Session event type.

    Name Description
    kTIMConvEvent_Add Adds a session. For example, when a new message is received and a new session is generated, this operation is triggered.
    kTIMConvEvent_Del Deletes a session. For example, if you delete a session, this operation is triggered.
    kTIMConvEvent_Update Updates a session. When the number of unread messages in a session changes or a new message is received, this operation is triggered.


    Session type.

    Name Description
    kTIMConv_Invalid Invalid session
    kTIMConv_C2C Personal session
    kTIMConv_Group Group session
    kTIMConv_System System session


    Platform information.

    Name Description
    kTIMPlatform_Other Unknown platform
    kTIMPlatform_Windows Windows platform
    kTIMPlatform_Android Android platform
    kTIMPlatform_IOS iOS platform
    kTIMPlatform_Mac MacOS platform
    kTIMPlatform_Simulator iOS simulator platform


    Configuration for initializing the IM SDK.

    JSON Key Value Type Attribute Description
    kTIMSdkConfigConfigFilePath string Write-only (optional) Configures the file path. The default path is "/".
    kTIMSdkConfigLogFilePath string Write-only (optional) Path of a log file. The default path is "/".
    kTIMSdkConfigJavaVM uint64 Write-only (optional) Configures the Java VM pointer of the Android platform.


    Information IDs of group members.

    Name Description
    kTIMGroupMemberInfoFlag_None None
    kTIMGroupMemberInfoFlag_JoinTime Join time
    kTIMGroupMemberInfoFlag_MsgFlag Option for receiving group messages
    kTIMGroupMemberInfoFlag_MsgSeq Member read message seq
    kTIMGroupMemberInfoFlag_MemberRole Member role
    kTIMGroupMemberInfoFlag_ShutupUntill Mute time. When the value is 0, mute is not enabled.
    kTIMGroupMemberInfoFlag_NameCard Group card


    Role IDs of group members.

    Name Description
    kTIMGroupMemberRoleFlag_All Obtains all role types.
    kTIMGroupMemberRoleFlag_Owner Obtains the owner (group owner).
    kTIMGroupMemberRoleFlag_Admin Obtains administrators, excluding group owners.
    kTIMGroupMemberRoleFlag_Member Obtains common group members, excluding group owners and administrators.


    Option for obtaining group member information.

    JSON Key Value Type Attribute Description
    kTIMGroupMemberGetInfoOptionInfoFlag uint64 TIMGroupMemberInfoFlag Read/Write (optional) Group member information is filtered based on information you want to obtain. The default value is 0xffffffff (obtain all information).
    kTIMGroupMemberGetInfoOptionRoleFlag uint64 TIMGroupMemberRoleFlag Read/Write (optional) Group member information is filtered based on member role. The default value is kTIMGroupMemberRoleFlag_All (obtain all roles).
    kTIMGroupMemberGetInfoOptionCustomArray array string Write-only (optional) See Custom Fields.


    Information IDs of group members.

    Name Description
    kTIMGroupInfoFlag_None -
    kTIMGroupInfoFlag_Name Group name
    kTIMGroupInfoFlag_CreateTime Group creation time
    kTIMGroupInfoFlag_OwnerUin Group owner account
    kTIMGroupInfoFlag_Seq -
    kTIMGroupInfoFlag_LastTime Last group information modification time
    kTIMGroupInfoFlag_NextMsgSeq -
    kTIMGroupInfoFlag_LastMsgTime Time of the most recent group message
    kTIMGroupInfoFlag_AppId -
    kTIMGroupInfoFlag_MemberNum Number of group members
    kTIMGroupInfoFlag_MaxMemberNum Maximum number of group members
    kTIMGroupInfoFlag_Notification Group announcement content
    kTIMGroupInfoFlag_Introduction Group introduction
    kTIMGroupInfoFlag_FaceUrl URL of a group profile photo
    kTIMGroupInfoFlag_AddOpton Option for adding a group
    kTIMGroupInfoFlag_GroupType Group type
    kTIMGroupInfoFlag_LastMsg Latest message in a group
    kTIMGroupInfoFlag_OnlineNum Number of online group members
    kTIMGroupInfoFlag_Visible Whether a group is visible
    kTIMGroupInfoFlag_Searchable Whether a group can be searc