LogoLogo
ALO.ai
Developer Documentation
Developer Documentation
  • Developer Documentation
  • Developer Account
    • API Key
  • SDKs
    • Authentication
    • Chat
      • Configuration
      • Send Messages
        • Upload Files
      • Message History
      • Message Actions
      • Message Counts
      • Translation
      • Typing Indicators
      • API Reference
        • Event
        • Message
    • Presence
      • Configuration
      • Basic Usage
      • Methods
    • Audio
      • Prerequisites
      • Instantiating Audio Service
      • Connect to a Channel
      • Disconnecting Audio Service
      • Push To Talk (PTT)
      • Full Duplex
      • Mute and Unmute Audio
      • Input/Output Device Selection
        • Microphone Selection
        • Speaker Selection
      • Channel Participants
      • Text To Speech Audio (TTS)
      • Automatic Reconnects
      • Handling Events
      • Classes
        • AloAudio
        • AudioUser
        • AudioChannel
        • Participant
    • Video
      • Prerequisites
      • Instantiating Video Service
      • Connect to a Channel
      • Disconnecting Video Service
      • Input Device Selection
        • Microphone Selection
        • Camera Selection
      • Publishing Streams
      • Modifying Published Streams
      • Channel Participants
      • Rendering Streams
        • Local Stream
        • Remote Streams
      • Muting/Unmuting Remote Streams
      • Recording Video (coming soon)
      • Automatic Reconnects
      • Handling Events
      • Classes
        • AloVideo
        • Participant
        • VideoChannel
        • VideoUser
  • ALO APPS
    • Overview
    • Creating Apps
    • Webhooks
      • Verifying Requests from ALO
    • Custom Action Forms
    • Using the ALO Platform API
  • ALO Platform API
    • Overview
    • Authentication
    • API
      • Actions and Periods
      • Channels
      • Channel Messages
      • Channel Users
      • Direct Message Channels
      • Direct Message Channel Chat Messages
      • Direct Message Channel Users
      • Groups
      • Periods
      • Types
      • Users
      • Video Management System
  • Misc
    • Supported Language Codes
Powered by GitBook
LogoLogo

ALO.ai

  • ALO.ai

© Copyright 2025 ALO.ai, Inc. • All Rights Reserved

On this page
  • Send a message action
  • Receive a message action
  1. SDKs
  2. Chat

Message Actions

Attach and receive custom message actions, such as emoji reactions or read receipts, with ALO's messaging features.

Message actions is a list of custom objects you can attach to a message that has already been published. You can use this collection for whatever you need such as emoji reactions, read receipts, and more.

Send a message action

chat.sendMessageAction({
    channelId: "alpha",
    messageId: "799acb6d-cc1d-4fbd-8aa9-1d61ae2cbb92",
    action: {
        type: "emoji-reaction",
        userId: "1f2428c6-6212-49a7-b9a4-d950d2acfe68",
        emoji: "🥳"
    }
}).then(({ status }) => {
    // status = { error: (true|false), errorData: { statusCode<Integer>, message<String> } }
    if (status.error) {
        console.log(`Send Message Action Failed:
            Reason: ${status.errorData.message}
            (Status Code: ${status.errorData.statusCode})
        `);
        return;
    }
});

sendMessageAction({ channelId: string, messageId: string, action: object })

Name

Type

Required

Description

channelId

string

yes

The id of the channel where the message is located

messageId

string

yes

The id of the message to append the message action to

action

object

yes

A custom object that you can fill with whatever key/value information you'd like

Receive a message action

You will receive an event every time a message action is sent in a channel that you are subscribed to.

chat.addEventListener((event) => {
    if (event.type === "message.action.new") {
        const { message, action } = event.data
        
        // You can get the entire array of message actions via:
        const { actions } = message;
    }
});

PreviousMessage HistoryNextMessage Counts

Last updated 8 months ago