# OpenHuman Messaging Channels: Protocol Differences and Implementation Guide

> Explore OpenHuman messaging channels discover protocol differences and implementation details. Connect Telegram Discord Slack and more with a unified JSON-RPC interface. Tinyhumansai openhuman.

- Repository: [Tiny Humans/openhuman](https://github.com/tinyhumansai/openhuman)
- Tags: how-to-guide
- Published: 2026-08-29

---

**OpenHuman messaging channels provide a unified JSON-RPC interface that abstracts diverse chat platforms—enabling the core application to interact with Telegram, Discord, Slack, and others through standardized methods while respecting platform-specific protocols and security constraints.**

OpenHuman is an extensible framework that unifies external chat services under a common messaging architecture. Each OpenHuman messaging channel is implemented as a separate domain under `src/openhuman/channels/`, following a shared RPC-based contract that abstracts protocol complexities. This design allows developers to send messages, fetch conversation history, and manage interactions across multiple platforms without writing platform-specific integration code.

## Architecture of OpenHuman Messaging Channels

OpenHuman implements a provider-pattern architecture where each messaging service operates as a distinct domain module. All channels expose the same **JSON-RPC namespace** (`/channel`), enabling frontend components to invoke methods like `list_conversations`, `send_message`, and `fetch_history` generically regardless of the underlying platform.

The core routing mechanism resides in [`src/openhuman/core/all.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/core/all.rs), where each channel registers its controllers during initialization. When the frontend issues a request, the runtime routes calls to the appropriate provider based on the **channel identifier** supplied in the RPC payload.

## Supported Channels and Protocol Differences

The framework supports eight distinct messaging platforms, each utilizing different underlying protocols and offering unique feature sets:

**Telegram** operates via the **Bot API (HTTPS)** protocol. It supports inline keyboards, media uploads, and message editing through the implementation in [`src/openhuman/channels/telegram.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/telegram.rs). Typical use cases include automated bots, notifications, and two-way chat applications.

**Discord** uses the **Gateway + REST API** protocol. It provides rich embeds, role-based permissions, and slash command support via [`src/openhuman/channels/discord.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/discord.rs). This channel suits community hubs and development operations notifications.

**Slack** implements the **Web API (OAuth)** protocol, supporting threads, file sharing, and reaction handling. The [`src/openhuman/channels/slack.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/slack.rs) file handles token exchange and channel lookup, making it ideal for workspace team alerts and corporate notifications.

**Signal** leverages **Signal-CLI** (local binary) for end-to-end encrypted communication. This desktop-only daemon approach provides secure personal messaging and group chat capabilities without exposing cryptographic keys to the network stack.

**WhatsApp** connects through the official **Cloud API**, enabling template messages, media handling, and two-way synchronization for customer support workflows.

**iMessage** requires **native macOS database access** and supports conversation import and read receipts, making it suitable for Apple-centric automation workflows.

**IRC** uses the **classic IRC protocol** with channel and nickname management features, serving legacy chat room integrations and bot implementations.

**Email** (via `tinychannels/email`) operates over **SMTP/IMAP** protocols, providing threaded conversations and attachments as a fallback for long-form messaging.

## Configuration and Security Model

Each provider requires a TOML configuration section in [`config.toml`](https://github.com/tinyhumansai/openhuman/blob/main/config.toml) (e.g., `[[channels.telegram]]` for Telegram settings). These sections store API keys, webhook URLs, and optional default parameters.

When credentials are missing or malformed, the channel's RPC methods return a **`CHANNEL_NOT_CONFIGURED`** error, prompting the UI to request user input through the web interface.

Security enforcement follows the standard agent tool policy. Channel interactions require:
- **`Network`** permission class for external API calls
- **`Write`** permission class for workspace modifications
- **`Destructive`** permission class for destructive operations like bulk deletion

The approval gate, enabled by default, surfaces interactive prompts for any operation exceeding the current autonomy tier.

## Implementation Examples

Listing configured channels using the Rust core:

```rust
use openhuman::core::rpc::RpcOutcome;
use openhuman::channels::controller::list_channels;

// Inside an async handler
let result: RpcOutcome<Vec<String>> = list_channels(&ctx).await?;

```

Sending a message via the frontend TypeScript client:

```tsx
import { coreRpcClient } from '@/services/coreRpcClient';

async function sendTelegram() {
  await coreRpcClient.call('channel_send_message', {
    channel_id: 'telegram',
    chat_id: '@mygroup',
    text: 'Hello from Open Human!',
  });
}

```

Fetching conversation history from Slack:

```rust
use openhuman::channels::slack::client::SlackClient;

let client = SlackClient::new(&config)?;
let history = client.fetch_conversation_history("C12345678", 50).await?;

```

## Key Source Files and Module Structure

Understanding the codebase organization helps developers extend the framework:

- [`src/openhuman/channels/mod.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/mod.rs) – The entry point that conditionally compiles each provider module
- [`src/openhuman/channels/telegram.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/telegram.rs) – Telegram Bot API implementation with webhook registration
- [`src/openhuman/channels/discord.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/discord.rs) – Discord gateway connection and event dispatch
- [`src/openhuman/channels/slack.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/slack.rs) – OAuth flows and Slack Web API client
- [`src/openhuman/channels/webview_accounts.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/webview_accounts.rs) – UI glue for OAuth redirect flows
- [`src/openhuman/channels/whatsapp_data.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/channels/whatsapp_data.rs) – WhatsApp event parsing and data mapping
- [`src/openhuman/core/all.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/core/all.rs) – Controller registration and RPC routing setup
- [`src/openhuman/config/schema/channels.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/config/schema/channels.rs) – TOML serialization structures for channel configuration

## Summary

- OpenHuman messaging channels abstract Telegram, Discord, Slack, Signal, WhatsApp, iMessage, IRC, and Email behind a unified JSON-RPC interface.
- Each channel implements a specific protocol (Bot API, Gateway, Signal-CLI, etc.) while exposing standard methods like `send_message` and `fetch_history`.
- Configuration occurs through TOML sections in [`config.toml`](https://github.com/tinyhumansai/openhuman/blob/main/config.toml), with missing credentials triggering `CHANNEL_NOT_CONFIGURED` errors.
- Security policies enforce `Network`, `Write`, and `Destructive` permission classes, with interactive approval gates for sensitive operations.
- New providers can be added by implementing a module under `src/openhuman/channels/` and registering controllers in [`src/openhuman/core/all.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/core/all.rs).

## Frequently Asked Questions

### What is the difference between OpenHuman messaging channels and direct API integrations?

OpenHuman messaging channels provide a standardized RPC layer that abstracts protocol-specific details, whereas direct API integrations require handling authentication, rate limiting, and data formats individually for each platform. The `channel_send_message` method works identically across Telegram, Discord, and Slack, while the underlying implementations in `src/openhuman/channels/` handle platform-specific formatting and transport.

### How does OpenHuman handle security for messaging operations?

All channel interactions pass through the security policy system defined in the core runtime. Operations requiring network access need the `Network` permission class, while writing to conversations requires `Write` permissions. Destructive actions like bulk deletion trigger additional `Destructive` class checks and interactive approval prompts when the autonomy gate is enabled.

### Can I add custom messaging channels to OpenHuman?

Yes, the modular architecture supports custom channels. Create a new Rust module under `src/openhuman/channels/`, implement the required RPC controller methods (such as `send_message` and `list_conversations`), and register the controller in [`src/openhuman/core/all.rs`](https://github.com/tinyhumansai/openhuman/blob/main/src/openhuman/core/all.rs). The channel will automatically inherit the security framework and configuration schema validation.

### Why does Signal require a local binary while other channels use HTTPS APIs?

Signal uses the Signal-CLI local binary to maintain end-to-end encryption without exposing decryption keys to the OpenHuman process or network stack. This architecture ensures that sensitive cryptographic operations remain isolated within the Signal daemon, whereas channels like Telegram and Slack rely on server-side APIs where encryption terminates at the vendor's infrastructure.