我们需要在Glip中获取新的未读消息的通知。我试图在API文档中找到它,但没有找到。有没有人知道那是不是可用的?
发布于 2020-04-13 02:12:00
要在Glip中接收新消息的通知,请使用以下事件过滤器订阅webhook或PubNub通知。
/restapi/v1.0/glip/posts
这将为您的用户发送所有新帖子的事件,这些用户可以是普通用户,也可以是聊天机器人用户。有关更多信息,请访问:https://developers.ringcentral.com/api-reference/Team-Messaging-Post-Event
glip-client SDK中提供了一个JavaScript实现:
https://github.com/ringcentral/ringcentral-chatbot-js
specific lines are at L139-L143。
await this.rc.post('/restapi/v1.0/subscription', {
eventFilters: [
'/restapi/v1.0/glip/posts',
'/restapi/v1.0/glip/groups',
'/restapi/v1.0/account/~/extension/~',
],
expiresIn: 473040000, // 15 years
deliveryMode: {
transportType: 'WebHook',
address: process.env.RINGCENTRAL_CHATBOT_SERVER + '/bot/webhook',
},
});https://stackoverflow.com/questions/60841819
复制相似问题