OkayAPI Docs
API Params
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY | |
other_uuid | String | Required | MIN: 32;MAX: 32 | 私信对话的会员uuid | |
last_id | String | Optaion | 0 | MIN: 0 | 上一次的消息ID,通过传递前面的私信消息ID以保证消息的连贯性。 |
direction | Enum | Optaion | down | Range: up/down | 获取私信消息的方向,up表示向上滑动,即取前面的旧消息;down表示向下滑动,即获取最新的消息。 |
perpage | Int | Optaion | 20 | MIN: 1;MAX: 100 | 分页数量 |
API Debug
KEY | REQUIRED | VALUE |
---|---|---|
app_key | *Required | |
other_uuid | *Required | |
last_id | Option | |
direction | Option | |
perpage | Option |
API Response
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,1不能和自己聊天,9表示插件未安装 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
list | Array | 消息列表 |
list[].id | Int | |
list[].chat_message_to_uuid | String | 当前会话的会员uuid |
list[].chat_message_data | Object | 消息数据结构体 |
list[].chat_message_type | String | 消息类型 |
list[].chat_message_is_read | Int | 是否已读,0未读1已读 |
list[].chat_message_io | String | 消息方向,in表示自己发出的,out表示收到的 |
list[].add_time | String | 消息发送时间 |
unread_num | Int | 未读消息数量 |
HTTP Response Code
HTTP Status Code | Description |
---|---|
Http Status = 200 | Success |
Http Status = 400 | Illegal-Params |
Http Status = 401 | Illegal-Token |
Http Status = 402 | IP-Banned |
Http Status = 404 | API-NOT-Exsits |
Http Status = 406 | Illegal-APPKEY |
Http Status = 407 | APPKEY-Expired-Out |
Http Status = 408 | APPKEY-Busy |
Http Status = 409 | Illegal-Sign |
Http Status = 413 | API-Traffic-NOT-Enough |
Http Status = 415 | API-LOCKED |
Http Status = 500 | Internal-Server-Error |