LANYINGDevelopers
Web & Mini ProgramiOSAndroidC++Server API

types#

types#

"flooNotice" (res)#

Floo notification

Kind: event emitted by types

ParamTypeDescription
resobjectResults
res.categorystringTypes
res.descstringDescription

Example

{category: 'loginMessage',desc: 'socket connecting...'} // Start connecting
{category: 'loginMessage',desc: 'socket connect success...'} // Connected
{category: 'loginMessage',desc: 'logining socket service...'} // Start logging in
{category: 'loginMessage',desc: 'login socket failure ......'} // Login failed
{category: 'loginMessage',desc: 'login socket success.....'} // Login succeeded
{category: 'loginMessage', desc: 'getting token...' } //Get token
{category: 'loginMessage',desc: 'token sucecc, getting roster lists..'} // Getting token succeeded, start to fetch friend list
{category: 'loginMessage',desc: 'get roster list failure:' + ex.message} // Friend list fetching failed
{category: 'action', desc: 'relogin' } // Need to automatically login
{category: 'action', desc: 'relogin_manually' }  // Need to manually login
{category: 'conversation_deleted',desc: { id, source:'user_operation' }} // Conversation deleted. id: conversation ID; source: origin
{category: 'userNotice', desc:'PASSWORD_CHANGED'} // User password changed
{category: 'userNotice', desc:'FROZEN'} // User account frozen
{category: 'userNotice', desc:'REMOVED'} // User removed
{category: 'userNotice', desc:'KICK_BY_SAME_DEVICE'} // Signed out by another session on the same device
{category: 'userNotice', desc:'KICKED_BY_OTHER_DEVICE'} // Signed out by a session on another device
{category: 'userNotice', desc:'INFO_UPDATED'} // User information changed:profile or setting
{category: 'userNotice', desc:'DEVICE_LOGIN'} // User's other device logged-in
{category: 'userNotice', desc:'DEVICE_LOGOUT'} // User's other device logged-out
{category: 'userNotice', desc:'DEVICE_ADDED'} // New device notified
{category: 'userNotice', desc:'DEVICE_REMOVED'} // Device removal notified
{category: 'userNotice', desc:'CLUSTER_CHANGED'} // The user's cluster changed; sign in again

"flooError" (res)#

FlooError

Kind: event emitted by types

ParamTypeDescription
resobject
res.categorystringTypes
res.descstringDescription

Example

{category: 'USER_BANNED', desc:'User is banned'}
{category: 'USER_FROZEN', desc:'User is frozen, please contact App Admin.'}
{category: 'APP_FROZEN', desc:'APP is frozen, please login Lanying IM Console for more details.'}
{category: 'LICENSE', desc:'Invalid LICENSE. Check that the service subscription is current.'}
{category: 'LICENSE', desc:'LICENSE user limit exceeded. Upgrade the service plan.'}
{category: 'DNS_FAILED', desc: dnsServer } // DNS error: server unreachable

"loginFail" (desc)#

Login failed

Kind: event emitted by types

ParamTypeDescription
descstringCause of failure

"loginSuccess" (res)#

Login successful

Kind: event emitted by types

ParamTypeDescription
resobjectEmpty object

"onGroupListUpdate" (meta)#

Group list updated

Kind: event emitted by types

ParamTypeDescription
metaMeta | undefinedNotification message content

"onGroupMemberChanged" (groupId)#

Group member list updated

Kind: event emitted by types

ParamTypeDescription
groupIdnumberGroupID

"onGroupMessage" (meta)#

Group message received

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content

"onInputStatusMessage" (res)#

The other party is typing

Kind: event emitted by types

ParamTypeDescription
resobject
res.extstringExtension data
res.fromstringSender's user ID
res.tostringReceiver's user ID

"onMentionMessage" (meta)#

Group @message received

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content

"onMessageCanceled" (res)#

Message is re-unread

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstringSessionID
res.midstringMessageID

"onMessageDeleted" (res)#

MessageDeleted

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstringSessionID
res.midstringMessageID

"onMessageRecalled" (res)#

Message is withdrawn

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstringSessionID
res.midstringMessageID

"onMessageStatusChanged" (res)#

Message status changed: withdrawn/deleted/read

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstringSessionID
res.midstringMessageID

"onReceiveHistoryMsg" (res)#

Message history received

Kind: event emitted by types

ParamTypeDescription
resobject
res.nextnumberThe key to get message history next time

"onRosterInfoUpdate" (res)#

Friend info changed

Kind: event emitted by types

ParamTypeDescription
resobject
res.rosterIdsArray.<number>Friend's user ID list

"onRosterListUpdate" (meta)#

Friend list changed

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of friend's notification

"onRosterApplied" (meta)#

Friend application received

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of friend's application

"onRosterMessage" (meta)#

Single chat message received

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content

"onRosterRTCMessage" (meta)#

Received a one-to-one voice & video message

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content

"onSendingMessageStatusChanged" (res)#

Message sending status changed

Kind: event emitted by types

ParamTypeDescription
resobject
res.status:numberSending status, can be valued as sendingfailedsent
res.mid:numberclient_mid generated by client

"onUnreadChange" (cid)#

Unread count changed

Kind: event emitted by types

ParamTypeDescription
cidnumberSessionID

"recentlistUpdate"#

Latest conversation updated

Kind: event emitted by types

"onGroupCreated" (meta)#

Group creation notification

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupDestoryed" (meta)#

Group dismissal notification

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupJoined" (meta)#

Member joining application notification

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupLeaved" (meta)#

Group member left notification

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupKicked" (meta)#

Group member removed notification

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupApplyAccepted" (meta)#

Group joining application approved

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupApplyDeclined" (meta)#

Group joining application rejected

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupBaned" (meta)#

Banned in group

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onGroupUnbaned" (meta)#

Unbanned in group

Kind: event emitted by types

ParamTypeDescription
metaMetaMessage content of group notification

"onRosterMessageContentAppend" (meta)#

Received appended content for a one-to-one message

Kind: event emitted by types

ParamTypeDescription
metaMetaOne-to-one message whose content was appended

"onGroupMessageContentAppend" (meta)#

Kind: event emitted by types

ParamTypeDescription
metaMetaGroup message whose content was replaced

"onRosterMessageReplace" (meta)#

Kind: event emitted by types

ParamTypeDescription
metaMetaOne-to-one message whose content was replaced

"onGroupMessageReplace" (meta)#

Kind: event emitted by types

ParamTypeDescription
metaMetaGroup message whose content was replaced

types~RosterItem : object#

Friend info

Kind: inner typedef of types
Properties

NameTypeDescription
aliasstringAlias
auth_modenumberVerification method: 0 - No verification, anyone can be added as a friend; 1 - consent is required to be added as a friend; 2 - answer questions correctly to be added as a friend; 3 - reject all adding friend requests,int32
auth_questionstringVerification question
avatarstringAvatar
descriptionstringDescription
extstringExtension information
mute_notificationbooleanWhether to receive message notifications
nick_namestringNickname or name
public_infostringPublic information, visible to both friends and strangers
relationnumberRelationships: 0 - Friend, 1 - Deleted, 2 - Stranger, int32
user_idnumberFriend user ID,int64
usernamestringUsername

types~UserSettings : object#

User settings information

Kind: inner typedef of types
Properties

NameTypeDescription
auth_answerstringAnswer of verification question
auth_modenumberVerification method: 0 - No verification, anyone can be added as a friend; 1 - consent is required to be added as a friend; 2 - answer questions correctly to be added as a friend; 3 - reject all adding friend requests,int32
auth_questionstringVerification question
auto_downloadbooleanWhether to download automatically
group_confirmbooleanWhether user consent is required when inviting to join group: true - user consent is required, false - invitation is automatically agreed
idnumberUser ID, int64
no_pushbooleanWhether to turn off push
no_push_detailbooleanWhether to push details
no_push_end_hournumberStart of push no-disturb time,int32
no_push_start_hournumberEnd of push no-disturb time,int32
no_soundsbooleanWhether to mute when message received
push_nick_namestringPush display name
push_tokenstringPush token
silence_end_timenumberEnd of push no-reminder time,int32
silence_start_timenumberStart of push no-reminder time,int32
user_idnumberUser ID,int64
vibratorybooleanWhether to vibrate when message received

types~UserProfile : object#

User information

Kind: inner typedef of types
Properties

NameTypeDescription
avatarstringAvatar url
descriptionstringDescription
emailstringEmail
mobilestringMobile number
nick_namestringNickname
private_infostringPrivate information, visible only to yourself
public_infostringPublic information, visible to both friends and strangers
user_idnumberUser ID,int64
usernamestringUsername

types~Meta : object#

Message body

Kind: inner typedef of types
Properties

NameTypeDescription
idstringMessageID
fromstringSender
tostringReceiver
contentstringMessage content
typestringMessage types: text, image, audio, video, file, location, command, forward
extstring | objectExtension data
configstring | objectSDKExtension field
attachstring | objectAttachment info
statusnumberMessage status: 0 - Unread, 1 - Delivered, 2 - Read
timestampstringMessage delivery timestamp (milliseconds)
toTypestringReceiver types: roster - friend, group - group

types~RosterApplication : object#

List entries of adding friend request

Kind: inner typedef of types
Properties

NameTypeDescription
expired_timenumberExpiration time,int64
reasonstringRequest description
statusnumberStatus: 0 - Awaiting confirmation, 1 - Approved, 2 - Rejected int32
user_idnumberUser ID that initiate adding friend,int64

types~GroupInfoAndSettings : object#

Group info

Kind: inner typedef of types
Properties

NameTypeDescription
apply_approvalnumberGroup membership application settings, 0: Agree all requests 1: Need to confirm by Admin 2: Reject all requests
avatarstringGroup avatar
ban_expire_timenumberExpiration time (second), during which only Admins are allowed to send messages, 0 or less than the current time means no banning, -1 means banned permanently
created_atnumberCreation time
descriptionstringGroup description
extstringGroup extension information
group_idnumberGroup id,int64
history_visiblebooleanHistory chat visibility settings for new members
member_invitebooleanGroup member invite settings: false - do not allow invitations, true - allow invitations (default)
member_modifybooleanGroup members modify group info settings: false - group members can't modify group info (default), true - group members can modify group info
msg_mute_modenumberGroup message blocking mode: 0 - no blocking, 1 - blocking local message notifications, 2 - blocking all, means not receiving messages
msg_push_modenumberGroup message push mode: 0 - receive all pushes, 1 - block all pushes, 2 - receive admin and @message pushes, 3 - receive admin message pushes only, 4 - receive @message pushes only
namestringGroup name
owner_idnumberGroup Owner id,int64
read_ackbooleanGroup message read function settings
statusnumberGroup state, 0: normal, 1: dissolved
typenumberGroup types: 1 - public group, 0 - private group, 2 - chatroom
updated_atnumberUpdate time,int64
countnumberNumber of group members
capacitynumberGroupCapacity

types~BriefGroupInfoAndSettings : object#

Group profile and user settings

Kind: inner typedef of types
Properties

NameTypeDescription
apply_approvalnumberGroup membership application settings, 0: Agree all requests 1: Need to confirm by Admin 2: Reject all requests
avatarstringGroup avatar
capacitynumberGroupCapacity
countnumberNumber of group members
group_idnumberGroup id,int64
msg_mute_modenumberGroup message blocking mode: 0 - no blocking, 1 - blocking local message notifications, 2 - blocking all, means not receiving messages
msg_push_modenumberGroup message push mode: 0 - receive all pushes, 1 - block all pushes, 2 - receive admin and @message pushes, 3 - receive admin message pushes only, 4 - receive @message pushes only
namestringGroup name
ownernumberGroup Owner id,int64
statusnumberGroup state, 0: normal, 1: dissolved,int32
typenumberGroup types: 1 - public group, 0 - private group, 2 - chatroom.int32

types~GroupMember : object#

Group member format

Kind: inner typedef of types
Properties

NameTypeDescription
display_namestringGroup member profile
join_timenumberMember join time,int64
user_idnumberUser id,int64
avatarstringAvatarAddress

types~GroupMemberBanned : object#

Banned members

Kind: inner typedef of types
Properties

NameTypeDescription
display_namestringGroup member profile
join_timenumberMember join time,int64
user_idnumberUser id,int64
avatarstringAvatarAddress
expired_timenumberBanExpiration time

types~GroupUserRelationResponse : object#

Group user's request result

Kind: inner typedef of types
Properties

NameTypeDescription
reasonstringReason
resultstringResults
user_idnumberUser ID,int64

types~GroupAnnouncement : object#

GroupAnnouncement content

Kind: inner typedef of types
Properties

NameTypeDescription
authornumberAnnouncement publisher,int64
contentstringAnnouncement content
created_atnumberAnnouncement publish time,int64
group_idnumberGroup id,int64
idnumberAnnouncement id,int64
titlestringAnnouncement tittle

types~GroupInfoRequest : object#

Create group

Kind: inner typedef of types
Properties

NameTypeDescription
avatarstringGroup avatar
descriptionstringGroup description
namestringGroup name
typenumberGroup type: 1 for public group, 0 for private group, 2 for chatroom,int32
user_listArray.<number>List of user ids invited to join group

types~GroupBannedMemberRequest : object#

Ban request

Kind: inner typedef of types
Properties

NameTypeDescription
durationnumberDuration of banned in minutes,int64
group_idnumberGroup id,int64
user_listArray.<number>User id list

types~GroupBlockedListItem : object#

Group blacklist

Kind: inner typedef of types
Properties

NameTypeDescription
user_idnumberUser id,int64
group_idnumberGroup id,int64
create_atstringCreation time

types~GroupInvitation : object#

Group invitation info

Kind: inner typedef of types
Properties

NameTypeDescription
group_idnumberGroupID
inviter_idnumberInviter ID
invitee_idnumberInvitee ID
reasonstringReason
statusnumberStatus: 0 - Pending, 1 - User agreed, 2 - User rejected
expire_timenumberExpiration time
create_atstringCreation time

types~GroupApplication : object#

GroupMembership application information

Kind: inner typedef of types
Properties

NameTypeDescription
group_idnumberGroupID
applicant_idnumberApplicant ID
reasonstringReason
expire_timenumberExpiration time
statusnumberStatus: 0 - Pending, 1 - Agreed, 2 - Rejected

types~GroupSharedFile : object#

Returned format of group shared files

Kind: inner typedef of types
Properties

NameTypeDescription
created_atnumberint64
file_idnumberShared file id,int64
group_idnumberGroup id,int64
namestringShared file name
sizenumberShared file size,int64
typestringShared file type
updated_atnumberint64
uploadernumberShared file uploader,int64
urlstringShared file url

types~GroupSharedFileResponse : object#

Result of group shared files deletion

Kind: inner typedef of types
Properties

NameTypeDescription
file_idnumberFileID
reasonstringReason
resultstringResults

types~GroupBanAllResponse : object#

Result of banning all members

Kind: inner typedef of types
Properties

NameTypeDescription
ban_expire_timenumberExpiration time of banning all members,int64

types~FileUpload : object#

File uploading info

Kind: inner typedef of types
Properties

NameTypeDescription
download_urlstringDownload address
oss_body_paramobject.<string, string>Additional parameters
upload_urlstringUpload address

types~FileUploadResult : object#

File uploading result

Kind: inner typedef of types
Properties

NameTypeDescription
urlstringDownload address

types~fileUploadProgress : function#

FileUpload progressCallback

Kind: inner typedef of types

ParamTypeDescription
resobjectProgress
res.loadednumberDownloaded bytes
res.totalnumberTotal bytes

types~ConversationItem : object#

Conversation info

Kind: inner typedef of types
Properties

NameTypeDescription
idnumberSessionID
contentstringMessage content
timestampstringMessage delivery timestamp (milliseconds)
typestringSession type: roster - Single chat, group - Group chat

types~UserProfile : object#

User information

Kind: inner typedef of types
Properties

NameTypeDescription
avatarstringAvatar url
descriptionstringDescription
emailstringEmail
mobilestringMobile number
nick_namestringNickname
private_infostringPrivate information, visible only to yourself
public_infostringPublic information, visible to both friends and strangers
user_idnumberUser ID,int64
usernamestringUsername

types~UserSettings : object#

User settings information

Kind: inner typedef of types
Properties

NameTypeDescription
auth_answerstringAnswer of verification question
auth_modenumberVerification method: 0 - No verification, anyone can be added as a friend; 1 - consent is required to be added as a friend; 2 - answer questions correctly to be added as a friend; 3 - reject all adding friend requests,int32
auth_questionstringVerification question
auto_downloadbooleanWhether to download automatically
group_confirmbooleanWhether user consent is required when inviting to join group: true - user consent is required, false - invitation is automatically agreed
idnumberSet ID
no_pushbooleanWhether to turn off push
no_push_detailbooleanWhether to push details
no_push_end_hournumberStart of push no-disturb time,int32
no_push_start_hournumberEnd of push no-disturb time,int32
no_soundsbooleanWhether to mute when message received
push_nick_namestringPush display name
push_tokenstringPush token
silence_end_timenumberEnd of push no-reminder time,int32
silence_start_timenumberStart of push no-reminder time,int32
user_idnumberUser ID,int64
vibratorybooleanWhether to vibrate when message received

types~Event : string#

Listening event name

Kind: inner typedef of types

types~EventCallback : function#

Listening event callback

Kind: inner typedef of types

Generated API content with concise AI notes where context helps.