发送消息
POST
/im/v2/conversations/{conversation_id}/messages
请求参数
Path 参数
conversation_id
string
必需
sender_id|conversation_type|receiver_id
sender_id:会话消息发送者的账号 ID,String 类型
conversation_type:会话类型,1:单聊会话;2:高级群会话;3:超大群会话
receiver_id:接收会话消息的账号 ID 或群组 ID
单聊会话时为消息接收者的账号 ID;高级群会话时为接收消息的高级群 ID;超大群会话时为超大群 ID。
示例值:
apifoxtest1|1|accid4
Header 参数
AppKey
string
必需
默认值:
{{AppKey}}
X-custom-traceid
string
可选
默认值:
{% mock 'uuid' %}
Nonce
string
必需
默认值:
{{Nonce}}
CurTime
string
必需
默认值:
{{CurTime}}
CheckSum
string
必需
默认值:
{{CheckSum}}
Body 参数application/json
sender_no_sense
boolean
发送方无感知
默认值:
false
receiver_no_sense
boolean
接收方无感知
默认值:
false
extension
string
开发者扩展字段
message
object
消息体
message_type
integer
消息类型
sub_type
integer
自定义消息子类型
> 0
text
string
文本消息
<= 500 字符
attachment
object
多媒体消息内容
message_client_id
string
客户端消息id(不传则自动生成)
message_config
object
消息配置
unread_enabled
boolean
未读数
默认值:
true
mutil_sync_enabled
boolean
多端同步
默认值:
true
offline_enabled
boolean
存离线
默认值:
true
history_enabled
boolean
云端历史
默认值:
true
roaming_enabled
boolean
漫游
默认值:
true
conversation_update_enabled
boolean
更新会话
默认值:
true
route_config
object
抄送配置
route_enabled
boolean
可选
默认值:
true
route_environment
string
可选
push_config
object
推送配置
push_enabled
boolean
是否推送
默认值:
true
push_nick_enabled
boolean
推送是否带昵称
默认值:
true
push_content
string
推送文案
<= 500 字符
push_payload
string
推送payload
<= 2048 字符
push_forcepush_all
boolean
是否强制推送
默认值:
false
push_forcepush_ids
array[string]
强推列表
push_forcepush_content
string
强推文案
<= 500 字符
antispam_config
object
安全通配置
antispam_enabled
boolean