How to fetch unread messages of a particular user through rocketchat rest api - rocket.chat

I am working on rocket.chat integration. I need to fetch all unread messages of a particular user through rest api. Do anyone know any method that will do this task? Couldn't find any in the documentation as well.

Related

Is it possible to know the number of unread Slack messages a user has with the Slack API?

I'm building a messaging integration with Slack and a client. I need to show the badges on the corresponding conversations when the users logs in to the client to show the client how many unread messages it has.
I know that the channels.history method had the unreads parameter which would return as part of the response the amount of unread messages according to the user token, but that method is deprecated and my app is too new to use it.
I'm using the conversations.history now to retrieve the messages which is what slack suggest to use instead of the deprecated method channel.history, but this new method doesn't have that parameter and doesn't show any info regarding the amount of unread messages in the conversation.
As my app is a new one and not a classic one, I cannot use the RTM API.
I'm also subscribed to the message events so that I know when a new message was posted.
My issue is that I need to know how many new messages were sent to the user while he was not logged in.
Is there any way to get that info?
Unread count is in conversations.info method, not in conversations.history. There in unread_count and unread_count_display property in reponse. Documentation is here.

Slack API for deleting Incoming Webhook

I have followed the process for using Slack Incoming Webhooks to post messages to channels successfully as per https://api.slack.com/messaging/webhooks. However, I could not find an API to delete a specific incoming Webhook. I can delete a specific webhook from the web UI if I go to the Slack App page so the API has to exist. Can someone please point me to the right API ?

How to get message events published on a Web API endpoint and feed it to bot framework v4 (C#, .Net Core Bot)?

I am using a third party API to provide Agent Handover (human chat) capabilities to my v4 based bot. The API requires a call back hook/ endpoint where it can send the messages/events back from the agent, and I have to get messages from it and display to users. When ever a new chat session is established a new session id is generated. And thus Session Id is passed back in all messages and events. Essentially they are sending events as Fire&Forget with a retry on failure.
For now I had implemented an eventstore (in Cosmos dB) to store events/messages and then poll Cosmos periodically display message back to user and mark them processed.
Is there any way to make it more real time or pub-sub kind of analogy?
I would like to know if some one have already implemented scenario like this. What should be the way to respond the incoming messages from agent to bot user.
Please suggest.
I would recommend creating a client using the Direct Line API to handle routing messages between the third party agent handover and the bot. Then in the bot you can pair the third party Direct Line conversation references with the user's conversation reference to forward the messages accordingly with proactive messages. For more details take a look at this Stack Overflow question.
Hope this helps!

Clickatell - API access to billing log?

I need to be able to access a log of all SMS that were sent. Is there a way to do this via their HTTP API? I haven't had much luck finding anything that reference this in their docs.
There is a feature called 'callbacks' that can send an HTTP request to your server for every message you send. It will give you status updates about the message and the message charge. This allows you to build up whatever form of custom reporting that you may want.
https://www.clickatell.com/developers/api-docs/callback-(push-status-and-cost-notification)-advanced-message-send/
You send your message with the callback parameter... And you specify your URL to receive callbacks on your API connection on the website.
Unfortunately, you can't access reporting features like that via API. You need to log in to your central dashboard to get that information.
You can, however, query the message status if you have the message ID, but I don't think that's quite what you're looking for.
(Disclosure: I work for Clickatell)

Looking for clarifications on how to build a group chat app using Sinch platform

I am trying to figure out how to use sinch to build a basic group messaging app. It looks pretty simple but I have a few questions to help me understand the platform:
1) It seems like the platform doesn't support multiple conversations for one user. For example facebook messenger allows you to have many conversations with different people (different chats). But sinch only lets you send a message to a user with no conversation meta data. Or is it possible to send your message with meta data?
2)Do you manage users on the sinch platform? This means creating user objects and giving them id's etc or must this be done on another platform like parse?
3)How do you handle messaging logs? Like if I send a message to someone that's not logged in- how do I save it and also send them a push notification that a message was sent?
Thanks for the help everyone- the documentation is a bit dilute so I haven't been able to find answers to these questions yet :/.
You can send meta data with headers, to create your own meta data thing. But to be fair Sinch is more like multi recipient message than groups with channels.
No, we use delegated security
We will automatically deliver the message when the user logs on, we keep messages for 30 days for delivery.

Resources