【问题标题】:Quickblox REST API for System Notification用于系统通知的 Quickblox REST API
【发布时间】:2016-06-07 15:52:08
【问题描述】:

从电子邮件中复制。

我想知道,有没有办法在 REST API 中发送系统消息,就像 iOS API 一样。 我在文档中尝试了“系统通知”,但它返回错误。

以下是我发送到服务器的 REST 请求。我在发送此令牌之前使用令牌登录。

curl -X POST \
-H "QB-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d "chat_dialog_id=xxxxxxxxxxxxxxxxxxxxxxx&recipient_id=xxxxxxx&extraParams.moduleIdentifier=SystemNotifications&sys_msg_type=update_group&type=headline&send_to_chat=1" \
https://api.quickblox.com/chat/Message.xml

【问题讨论】:

    标签: rest quickblox


    【解决方案1】:

    extraParams.moduleIdentifier - 参数名称错误

    您不能在参数名称中使用.

    如果您想在extra_params 中设置自定义参数,那么您需要设置参数moduleIdentifier 而不设置extraParams.

    【讨论】:

    • 这将使消息像普通消息一样发送。这样做的目的是改为发送 SystemMessage / SystemNofications。根据 quickblox 中的文档:任何系统通知都有一个特殊的通道。最终用户可以使用它来拆分常规聊天消息和其他系统事件。所有此类消息都应包含 extraParams.moduleIdentifier=SystemNotifications 并使用 type=headline。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-01-09
    • 1970-01-01
    • 1970-01-01
    • 2020-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多