简体   繁体   English

RingCentral Glip 的通知

[英]Notification for RingCentral Glip

We need the get notifications of new unread messages in Glip.我们需要在 Glip 中获取新未读消息的通知。 I tried to find this in the API documentation but do not see.我试图在 API 文档中找到它,但没有看到。 Anyone know if that is available?有谁知道这是否可用?

To receive notifications for new messages in Glip, subscribe for webhook or PubNub notifications with the following event filter.要在 Glip 中接收新消息的通知,请使用以下事件过滤器订阅 webhook 或 PubNub 通知。

/restapi/v1.0/account/~/extension/~/glip/posts

This will send you events for all new posts for your user whiich can be a regular user or a chatbot user.这将为您的用户发送所有新帖子的事件,该用户可以是普通用户或聊天机器人用户。

A JavaScript implementation is available in the glip-client SDK: glip-client SDK 中提供了一个 JavaScript 实现:

https://github.com/tylerlong/glip-client https://github.com/tylerlong/glip-client

  subscribe (callback) {
    this.subscription = this.rc.createSubscription()
    this.subscription.on(this.subscription.events.notification, (notification) => {
      callback(notification.body)
    })
    this.subscription.setEventFilters(['/restapi/v1.0/account/~/extension/~/glip/posts']).register()
  }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM