# @azure/communication-signaling

> Azure Communication Signaling Client

Latest version **1.0.0-beta.34** (published 2025-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @azure/communication-signaling
pnpm add @azure/communication-signaling
yarn add @azure/communication-signaling
bun add @azure/communication-signaling
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.34 |
| Published | 2025-06-21 |
| First published | 2020-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 10 |
| Unpacked size | 3.6 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Microsoft Corporation |
| Maintainers | azure-sdk, microsoft1es |
| Keywords | azure, cloud, Azure |

## Links

- npm: https://www.npmjs.com/package/@azure/communication-signaling
- npm.io page: https://npm.io/package/@azure/communication-signaling

## Dependencies (10)

- [uuid](https://npm.io/package/uuid.md) ^8.3.0
- [tslib](https://npm.io/package/tslib.md) ^2.2.0
- [events](https://npm.io/package/events.md) ^3.0.0
- [@azure/logger](https://npm.io/package/@azure/logger.md) ^1.0.0
- [@azure/core-auth](https://npm.io/package/@azure/core-auth.md) ^1.3.0
- [@azure/core-util](https://npm.io/package/@azure/core-util.md) ^1.0.0
- [@azure/core-client](https://npm.io/package/@azure/core-client.md) ^1.9.2
- [@azure/core-tracing](https://npm.io/package/@azure/core-tracing.md) ^1.0.0
- [@azure/abort-controller](https://npm.io/package/@azure/abort-controller.md) ^1.0.0
- [@azure/core-rest-pipeline](https://npm.io/package/@azure/core-rest-pipeline.md) ^1.16.3

## Recent versions

- 1.0.0-beta.34 (latest) — 2025-06-21
- 1.0.0-beta.33 — 2025-05-13
- 1.0.0-beta.32 — 2025-02-19
- 1.0.0-beta.31 — 2025-01-21
- 1.0.0-beta.29 — 2024-10-17
- 1.0.0-beta.28 — 2024-08-01
- 1.0.0-beta.27 — 2024-06-04
- 1.0.0-beta.26 — 2024-04-11
- 1.0.0-beta.25 — 2024-04-10
- 1.0.0-beta.24 — 2024-04-10
- 1.0.0-beta.23 — 2023-12-04
- 1.0.0-beta.22 — 2023-11-22
- 1.0.0-beta.21 — 2023-10-10
- 1.0.0-beta.20 — 2023-08-23
- 1.0.0-beta.19 — 2023-08-02
- … 18 more at https://npm.io/package/@azure/communication-signaling/versions

## README

# Azure Communication Signaling client library for JavaScript

The Azure Communication Signaling client library lets developers add real-time notifications for receiving new/update/delete chat message events, typing indicator event, read receipt event, and chat thread events.

Read more about Azure Communication Services [here](https://docs.microsoft.com/azure/communication-services/overview)

## Getting started

## Prerequisites

- An [Azure subscription][azure_sub].
- An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal], the [Azure PowerShell][azure_powershell], or the [Azure CLI][azure_cli].
- [Node.js](https://nodejs.org)

### Installing

```bash
npm install @azure/communication-signaling
```

### Browser support

#### JavaScript Bundle

This client library is only supported in the browser. To use this client library, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

## Key concepts

### SignalingClient

`SignalingClient` is the primary interface for developers using this client library. It provides methods to enable/disable real-time notifications and register listeners for different events.

## Examples

### Initialize SignalingClient

Use user access token and Azure logger to initialize signaling client.

```JavaScript
import { CommunicationSignalingClient } from '@azure/communication-signaling';
import { AzureCommunicationTokenCredential } from "@azure/communication-common";
import { createClientLogger } from "@azure/logger";

let userAccessToken = '<USER_ACCESS_TOKEN>';
let tokenCredential = new AzureCommunicationTokenCredential(userAccessToken);
let logger = createClientLogger("communication-signaling");
let signalingClient = new CommunicationSignalingClient(tokenCredential, logger);

```

### Enable real-time notifications

```JavaScript
signalingClient.start();

```

### Disable real-time notifications

```JavaScript
signalingClient.stop();

```

### Register listener to events

With real-time signaling, you can subscribe to listen for new incoming events and call your own business logic accordingly.

```JavaScript

// register listener to new incoming message event
signalingClient.on("chatMessageReceived", (payload) => {
    console.log("Notification chatMessageReceived!");
    // your code here
});

// register listener to typing indicator event
signalingClient.on("typingIndicatorReceived", (payload) => {
    console.log("Notification typingIndicatorReceived!");
    // your code here
});

// register listener to thread deleted event
signalingClient.on("chatThreadDeleted", (payload) => {
    console.log("Notification chatThreadDeleted!");
    // your code here
});

```

[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_powershell]: https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice

---
_Source: https://npm.io/package/@azure/communication-signaling · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
