We need the get notifications of new unread messages in Glip. I tried to find this in the API documentation but do not see. 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.
/restapi/v1.0/glip/posts
This will send you events for all new posts for your user whiich can be a regular user or a chatbot user. Read more at: https://developers.ringcentral.com/api-reference/Team-Messaging-Post-Event
A JavaScript implementation is available in the glip-client SDK:
https://github.com/ringcentral/ringcentral-chatbot-js
The 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',
},
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With