The Agora Real-time Messaging (RTM) SDK for JavaScript, currently stable at version 2.2.4, provides robust real-time interaction capabilities for client applications. This SDK enables developers to integrate feature-rich, scalable, and proven real-time engagement solutions, moving beyond basic messaging to support complex scenarios like conference control, interactive games, metaverse applications, online education, e-commerce, and smart devices. Version 2.x represents a significant iteration, offering enhanced functions, improved performance, and a better user experience compared to its predecessors. While an explicit release cadence isn't stated, the continuous iteration to version 2.x and ongoing updates (such as v2.2.8 released Feb 2026) suggest active development and maintenance. Key differentiators include its proven reliability with over 3000 customers, wide applicability across diverse use cases, and strong focus on scalable real-time messaging, often complementing Agora's RTC (Real-time Communication) offerings for voice and video.
npm install agora-rtm-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes the Agora RTM client, logs in with a user ID and optional token, joins a specified channel, and sends a text message to that channel. It also sets up event listeners for connection state changes and incoming peer/channel messages.
Consult the official Agora Signaling 2.x migration guide for a comprehensive list of changes and updated API usage. Refactor initialization, event handling, and channel interactions.
Verify that all instances of your application use the identical `App ID` obtained from the Agora Console. For debugging, ensure the App ID is correctly configured and the Signaling feature is enabled for your project in the Agora Console, with a data center selected.
Refer to the 'Requirements' section in the official Agora RTM SDK documentation for a comprehensive list of supported browsers and their minimum versions. Ensure your target environment meets these prerequisites.
If manually integrating via CDN, delete older versions of `libaosl.so`. If using dependency management, ensure the newer version of `libaosl.so` is included and handle potential conflicts according to Agora's guide on co-integrating Signaling and Video/Voice SDKs. For Android Maven, note the package name change for 2.2.8.
Log into your Agora Console, navigate to your project, and ensure that the 'Signaling' feature is enabled and a data center is selected under 'All features > Signaling > Basic information'.
Ensure the App ID, User ID (UID), and token (if used) are correct and match what was used for token generation. For production, tokens should be generated server-side. Check server time synchronization if tokens are time-sensitive. If using temporary tokens, ensure the App ID is enabled for debug mode.
For ESM, use `import AgoraRTM from 'agora-rtm-sdk';`. For CommonJS, use `const AgoraRTM = require('agora-rtm-sdk');`. Ensure you're calling `createInstance` as a method of the imported `AgoraRTM` object, e.g., `AgoraRTM.createInstance(APP_ID)`.