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.

Tokens
26K
Snippets
155
Records
250
Agent score
64%

What's inside Voce Chat

  1. Overview of VoceChat

    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.
  2. 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}
  3. 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}
  4. Prerequisites for using the VoceChat widget

    Before embedding the chat widget, ensure the following requirements are met:

    1. A running VoceChat server instance.
    2. You must be logged into the server.
    3. Enable public access: Go to Setting $\rightarrow$ Overview and enable the option to allow everyone to join the server.
    4. Enable 3rd party login (e.g., Google or GitHub) to facilitate guest access.
  5. 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)"
    }
  6. 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.
  7. 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.
  8. 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 users
      • name (string)
      • avatar (uint64, optional)
    • messages (object[]): List of messages
      • from_user (uint64)
      • created_at (timestamp)
      • mid (int64)
      • source (object): Message target
      • properties (object, optional)
        • content_type (string)
        • content (string, optional)
        • file_id (uint64, optional)
        • thumbnail_id (uint64, optional)
        • num_attachments (uint64, optional)
  9. Deploy VoceChat server using Docker

    Deploy the VoceChat server as a Docker container. The default image is for linux/amd64. For linux/arm64 architectures, use the image privoce/vocechat-server:latest-arm64 instead.
    # Run the container on port 3000
    docker run -d --restart=always \
      -p 3000:3000 \
      --name vocechat-server \
      privoce/vocechat-server:latest
  10. Set 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:

    1. In Gmail, go to 'See all settings' and enable IMAP.
    2. Visit the Google App Passwords page: https://myaccount.google.com/apppasswords
    3. Create a new app to generate a unique 16-character app password.
    4. In the Vocechat 'SMTP Setting' page, enter the generated app password.
    5. Set the SMTP Port to 465.
  11. 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/backup
  12. Configure 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:

    1. Access the Firebase Console.
    2. Navigate to Project Settings (gear icon on the left sidebar).
    3. Select the Service Accounts tab.
    4. Click Generate new private key to download a JSON configuration file.
    5. In VoceChat, go to Settings -> Configuration -> Firebase.
    6. Open the downloaded JSON file and copy the following fields into the corresponding VoceChat settings:
      • Token URL
      • Project ID
      • Private Key
      • Client Email
    7. Save the settings.