Question about Efficient Reception of Talk Messages for a Bot User

Hello everyone,

I have developed a custom bot that operates as a regular user within Nextcloud Talk, integrated into an automated workflow (external service).

Currently, the bot retrieves new messages via a cron job that periodically polls the Talk API to detect new messages and process them.

This works, but it feels inefficient and not very elegant.

My questions:

  • Is there a recommended or more efficient way to receive new Talk messages in real time (or near real time) for a bot user?
  • Does Nextcloud provide any webhook mechanism, push-based approach, or event listener system for Talk conversations?
  • Is there an officially supported best practice for implementing bot-like behavior in Talk without relying on polling?

The bot acts as a normal user (not a Nextcloud app) and is authenticated via API.

I would appreciate any guidance on best practices or architectural recommendations.

Thank you in advance.

Best regards
Dustin

Hey,
yes, yes and yes :slight_smile: Please see Bots and webhooks - Nextcloud Talk API documentation

I initially tried using bots, but that’s simply bad for users, as they always have to address the bot with @. Just impractical.

You might want to read the linked documentation, there are bots that work with “@” in front, but it is not required.
You can use webhooks, app bots, etc.

But in case you want to keep the bot user, you can use this API: Chat management - Nextcloud Talk API documentation