REST API Chat Listener

Hello,
I was wondering, how can i make two users chat with each other using RocketChat API’s?
i want some kind of listener to let the end user to receive the message instantly.

I read that it is possible through Realtime Api’s but i have no idea how to use them.
if you could help me by telling me or giving me some resources that may help.
Thank you.

Here’s Rocket.Chat’s RealTime documentation, so you can take a look: https://rocket.chat/docs/developer-guides/realtime-api/.

@ibrahimdoqa Not sure if it will help, but i have a really basic DDP listener I wrote here that shows how the real-time API can be tapped into - https://github.com/JSzaszvari/rocketchat-ddp-listener

1 Like

Thank you. is it secure?
as far as i know that DDP is not secure enough. because the system i am working on MUST be secure.

Depends on what your qualifications for “secure” are.

If you use https transit is covered. Making DDP just as secure as any other REST API request for any other system :slight_smile: