JavaScript SDK Recipes¶
This section contains focused code recipes for specific Azure Communication Services (ACS) tasks.
Recipe Catalog¶
| Recipe | When to Use |
|---|---|
| Managed Identity | Authenticating with ACS using Azure Managed Identities instead of connection strings. |
| Key Vault Reference | Storing and retrieving ACS connection strings securely from Azure Key Vault. |
| Event Grid Webhooks | Handling ACS events (SMS received, Email delivered) using Express or Fastify. |
| Phone Number Management | Searching, purchasing, and releasing ACS phone numbers. |
| Email with Attachments | Sending emails with multiple file attachments and handling size limits. |
| Calling UI Composite | Adding comprehensive video calling UI with minimal code using the ACS UI Library. |
| Teams Interop | Joining Microsoft Teams meetings from a browser application. |
Quick Link: Managed Identity¶
const { CommunicationIdentityClient } = require("@azure/communication-identity");
const { DefaultAzureCredential } = require("@azure/identity");
const endpoint = "https://<your-acs-resource-name>.communication.azure.com";
const client = new CommunicationIdentityClient(endpoint, new DefaultAzureCredential());