OkayAPI Docs


API Path: /api/App/Market_ChatMessage/Send

API Description: 发送私信,非好友也可以发送。使用前请先安装私信插件

1
API Traffic
HTTP/HTTPS
Protocol
GET/POST
Method
UTF-8
Charset
JSON
Response

API Debug   


API Params

ParameterTypeRequiredDefaultNoteDescription
HTTP_APPKEYStringRequiredMIN: 32Common Put Your APPKEY
other_uuidStringRequiredMIN: 32;MAX: 32接收私信的会员uuid
chat_message_typeEnumRequiredtextRange: text/html/image/link/custom私信消息类型,text普通文本,html富文本,image图片,link链接,custom自定义。注意,不同私信类型,需要提供的chat_message_data参数不同。
chat_message_dataArrayJSON FormatRequired私信消息数据,JSON格式。不同消息类型,参数格式不同。分别是:
  • text普通文本:{"content":"(必须)文本消息内容"};
  • html富文本:{"content":"(必须)HTML消息内容"};
  • image图片:{"url":"必须)图片链接"};
  • link链接:{"url":"(必须)链接"};
  • custom自定义:{"xxx":"自定义结构"}。
此外,全部消息类型均支持emoji表情(例如:我 ❤ ⚽ ),且支持更多自定义扩展字段。

API Debug

KEYREQUIREDVALUE
app_key *Required
other_uuid *Required
chat_message_type *Required
chat_message_data *Required

API Response

KEYTypeDescription
err_codeInt操作码,0表示成功,1不能发送给自己,2发送失败,9表示插件未安装
err_msgString错误提示信息,err_code非0时参考此提示信息

HTTP Response Code

HTTP Status CodeDescription
Http Status = 200Success
Http Status = 400Illegal-Params
Http Status = 401Illegal-Token
Http Status = 402IP-Banned
Http Status = 404API-NOT-Exsits
Http Status = 406Illegal-APPKEY
Http Status = 407APPKEY-Expired-Out
Http Status = 408APPKEY-Busy
Http Status = 409Illegal-Sign
Http Status = 413API-Traffic-NOT-Enough
Http Status = 415API-LOCKED
Http Status = 500Internal-Server-Error