Skip to main content

Message Detailed Type Description Document

ContentType

Brief Description

  • Description of message types supported by the contentType field in the administrator message sending and detailed field descriptions of the message content.

ContentType Message Type Description

ContentType ValueType Description
101Text message
102Image message
103Audio message
104Video message
105File message
106@ message
109Location message
110Custom message
1400System notification message

Specific Content

  • The content inside is a specific json object; different message types are different json objects.

Text Message

{
...,
"content": {
"content": "nihao"
},
....
}
ParameterRequiredTypeDescription
contentYesstringSpecific content of the text message

Business Card Message

{
...,
"content": {
"userID":"",
"nickname":"",
"faceURL":"",
"ex":""
},
....
}
ParameterRequiredTypeDescription
userIDYesstringUser ID
nicknameYesstringUsername
faceURLYesstringUser avatar
exNostringExtended field

Image Message

{
...,
"content": {
"sourcePath":"",
"sourcePicture":{
"uuid":"",
"type":"",
"size":0,
"width":0,
"height":0,
"url":""
},
"bigPicture":{
"uuid":"",
"type":"",
"size":0,
"width":0,
"height":0,
"url":""
},
"snapshotPicture":{
"uuid":"",
"type":"",
"size":0,
"width":0,
"height":0,
"url":""
}
},
....
}
Parameter NameRequiredTypeDescription
sourcePathNostringFull path of the image file on the local machine
sourcePictureYesobjectOriginal image information
bigPictureYesobjectLarge image information
snapshotPictureYesobjectThumbnail information
uuidNostringUnique ID of the image file
typeYesstringImage file type
sizeNointImage file size
widthYesintImage width
heightYesintImage height
urlYesstringImage download URL

Audio Message

{
...,
"content": {
"uuid":"",
"soundPath":"",
"sourceUrl":"",
"dataSize":0,
"duration":0,
"soundType":""
},
....
}
ParameterRequiredTypeDescription
uuidNostringUnique ID of the audio file
soundPathNostringLocal path of the audio file
sourceUrlYesstringAudio file download URL
dataSizeNointAudio file size
durationYesintAudio duration
soundTypeNostringAudio file type

Video Message

{
...,
"content": {
"videoPath":"",
"videoUUID":"",
"videoUrl":"",
"videoType":"",
"videoSize":0,
"duration":0,
"snapshotPath":"",
"snapshotUUID":"",
"snapshotSize":0,
"snapshotUrl":"",
"snapshotWidth":0,
"snapshotHeight":0
},
....
}
Parameter NameRequiredTypeDescription
videoPathNostringLocal path of the video file
videoUUIDNostringUnique ID of the video file
videoUrlNostringVideo file download URL
videoTypeYesstringVideo file type
videoSizeYesintVideo file size
durationYesintVideo duration
snapshotPathNostringLocal path of the video thumbnail image file
snapshotUUIDNostringUnique ID of the video thumbnail image file
snapshotSizeNointVideo thumbnail image file size
snapshotUrlYesstringVideo thumbnail image file download URL
snapshotWidthYesintVideo thumbnail image width
snapshotHeightYesintVideo thumbnail image height

File Message

{
...,
"content": {
"filePath":"",
"uuid":"",
"sourceUrl":"",
"fileName":"",
"fileSize":0,
"fileType":""
},
....
}
ParameterRequiredTypeDescription
filePathNostringLocal file path
uuidNostringUnique file ID
sourceUrlYesstringFile download URL
fileNameYesstringFile name
fileSizeYesintFile size
fileTypeNostringFile type

Emoticon Message

{
"index": 0,
"data": ""
}
ParameterRequiredTypeDescription
indexYesintEmoticon index
dataNostringCustom json data of emoticon

@ Message

{
...,
"content": {
"text": "",
"atUserList": ['12312'],
"isAtSelf": false,
},
....
}
参数名必选类型说明
textjson stringmessage
atUserListjson string[]@usersId list
isAtSelfjson stringwheter @ slef

Location Message

{
"description": "",
"longitude": 0,
"latitude": 0
}
ParameterRequiredTypeDescription
descriptionNostringLocation description
longitudeYesdoubleLongitude
latitudeYesdoubleLatitude

Custom Message

{
...,
"content": {
"data": "",
"description": "",
"extension": ""
},
....
}
ParameterRequiredTypeDescription
dataYesjson stringCustom json object converted to string
descriptionNojson stringExtension description information as a json object converted to string, optional use
extensionNojson stringExtension field, currently not used

System Notification Message

As a special type of custom notification message, the system notification message will generate an independent conversation on the client side with a fixed conversation type of 4. The sender ID must be one of the administrator IDs configured in the backend config file.

{
...,
"content": {
{"content": {
"notificationName": "Document Management",
"notificationFaceURL": "http://www.head1.com",
"notificationType": 1,
"text": "Hello everyone, today is...",
"externalUrl":"",
"mixType": 0,
"pictureElem": {
"sourcePath": "",
"sourcePicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
},
"bigPicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
},
"snapshotPicture": {
"uuid": "",
"type": "",
"size": 0,
"width": 0,
"height": 0,
"url": ""
}
},
"soundElem": {
"uuid": "",
"soundPath": "",
"sourceUrl": "",
"dataSize": 0,
"duration": 0
},
"videoElem": {
"videoPath": "",
"videoUUID": "",
"videoUrl": "",
"videoType": "",
"videoSize": 0,
"duration": 0,
"snapshotPath": "",
"snapshotUUID": "",
"snapshotSize": 0,
"snapshotUrl": "",
"snapshotWidth": 0,
"snapshotHeight": 0
},
"fileElem": {
"filePath": "",
"uuid": "",
"sourceUrl": "",
"fileName": "",
"fileSize": 0
},
"ex": ""
},
....
}
ParameterRequiredTypeDescription
notificationNameYesstringNotification title
notificationFaceURLNostringNotification avatar URL
notificationTypeYesintNotification type, e.g., 1 for onboarding notifications, 2 for offboarding notifications, etc.
textYesstringNotification main content
externalUrlNostringThe URL to redirect to when the notification is clicked (if left blank, no redirection occurs)
mixTypeYesintNotification mixed type
0: Text only
1: Text + Image
2: Text + Video
3: Text + File
4: Text + Audio
5: Text + Audio + Image
pictureElemNoobjectImage element
sourcePictureNoobjectOriginal picture
bigPictureNoobjectLarge picture
snapshotPictureNoobjectThumbnail
soundElemNoobjectAudio element
videoElemNoobjectVideo element
fileElemNoobjectFile element
exNostringExtended field