Voce Chat API Documentation
website·Indexed 33 days ago
https://doc.voce.chat/API reference for Voce Chat, featuring endpoints for managing users, groups, and messages. Includes functionality for sending and editing messages, managing bot API keys, handling Agora and Firebase configurations, and administering system licenses and metrics.
What's inside Voce Chat
- VoceChat is a secure, self-hosted chat software designed for independent deployment, ensuring users have complete control over their data. It supports encrypted transmission and features a 'burn after reading' capability. It is positioned as a social collaboration tool that can be deployed on private clouds, drawing inspiration from Slack, Discord, RocketChat, Matrix, and Solid.
Retrieve a group by its ID
Use this endpoint to fetch detailed information about a specific group. The request requires a group ID (gid) as a path parameter.GET /groups/{gid}Retrieve a user by their ID
Retrieve detailed information about a specific user by providing their unique user ID (uid) as a path parameter. The response includes profile details such as email, name, admin status, online status, and account status (normal or frozen).GET /users/{uid}Prerequisites for using the VoceChat widget
Before embedding the chat widget, ensure the following requirements are met:
- A running VoceChat server instance.
- You must be logged into the server.
- Enable public access: Go to Setting $\rightarrow$ Overview and enable the option to allow everyone to join the server.
- Enable 3rd party login (e.g., Google or GitHub) to facilitate guest access.
Retrieve organization information via API
Call the 'Get the organization info' endpoint to retrieve details about the organization. A successful response (HTTP 200) returns an object containing the organization's name and an optional description.{ "name": "string", "description": "string (optional)" }Configure server sign-up permissions
In the Overview section of the server settings, you can define who is allowed to create an account on the server using the 'Default Sign up' setting. The available options are:
- Everyone: Any user can sign up for the server.
- Invitation Link Only: Only users with a valid invitation link can sign up.
Integrate VoceChat with OpenClaw via Plugin
The VoceChat plugin allows VoceChat to serve as the chat frontend for OpenClaw. It supports receiving inbound webhooks, routing messages to OpenClaw, sending text and file replies, and supports both private and group chats. The integration follows this flow: VoceChat User → VoceChat Bot Webhook → OpenClaw Gateway + VoceChat Plugin → OpenClaw Agent Runtime → VoceChat Bot API.Retrieve favorite archive information
Use the 'Get favorite archive info' endpoint to retrieve details about a specific favorite archive. The request requires a unique identifier for the archive. The response returns a list of users and messages associated with the archive, including message content, timestamps, and attachment counts.Path Parameters
id(string): REQUIRED - The unique identifier of the favorite archive.
Response Schema (200 OK)
users(object[]): List of usersname(string)avatar(uint64, optional)
messages(object[]): List of messagesfrom_user(uint64)created_at(timestamp)mid(int64)source(object): Message targetproperties(object, optional)content_type(string)content(string, optional)file_id(uint64, optional)thumbnail_id(uint64, optional)num_attachments(uint64, optional)
Deploy VoceChat server using Docker
Deploy the VoceChat server as a Docker container. The default image is forlinux/amd64. Forlinux/arm64architectures, use the imageprivoce/vocechat-server:latest-arm64instead.# Run the container on port 3000 docker run -d --restart=always \ -p 3000:3000 \ --name vocechat-server \ privoce/vocechat-server:latestSet up Gmail as the SMTP provider for Vocechat
To use Gmail for sending Vocechat emails, you must enable IMAP and create a Google App Password to bypass standard login restrictions.
Steps to configure Gmail:
- In Gmail, go to 'See all settings' and enable IMAP.
- Visit the Google App Passwords page: https://myaccount.google.com/apppasswords
- Create a new app to generate a unique 16-character app password.
- In the Vocechat 'SMTP Setting' page, enter the generated app password.
- Set the SMTP Port to 465.
Back up VoceChat server data
Back up the VoceChat server data by recursively copying the data directory to a backup location.cp -rf ~/.vocechat-server/data ~/.vocechat-server/backupConfigure Firebase Cloud Messaging (FCM) for VoceChat push notifications
To enable push notifications in VoceChat, an administrator must configure a Firebase project and provide the service account credentials in the VoceChat settings.
Steps to configure:
- Access the Firebase Console.
- Navigate to Project Settings (gear icon on the left sidebar).
- Select the Service Accounts tab.
- Click Generate new private key to download a JSON configuration file.
- In VoceChat, go to Settings -> Configuration -> Firebase.
- Open the downloaded JSON file and copy the following fields into the corresponding VoceChat settings:
- Token URL
- Project ID
- Private Key
- Client Email
- Save the settings.