Azure Communication Services (ACS) brings the power of Microsoft Teams to your own applications. You get the same reliable global network for voice, video, chat, and SMS, accessible via REST APIs and SDKs.
Architecture Overview
flowchart LR
UserApp[Your Web/Mobile App]
ACS[Azure Communication Services]
Teams[Microsoft Teams]
PSTN[Phone Network]
UserApp -->|SDK| ACS
ACS -->|VoIP| Teams
ACS -->|SMS/Call| PSTN
style ACS fill:#E3F2FD,stroke:#1565C0,stroke-width:2px
style Teams fill:#E8EAF6,stroke:#3F51B5
Creating a Chat Client
Here is how simple it is to initialize a chat client in JavaScript/TypeScript:
import { ChatClient } from '@azure/communication-chat';
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
// Initialize the client
const credential = new AzureCommunicationTokenCredential('<USER_ACCESS_TOKEN>');
const chatClient = new ChatClient('<ENDPOINT_URL>', credential);
// Send a message
const chatThreadClient = chatClient.getChatThreadClient('<THREAD_ID>');
await chatThreadClient.sendMessage({ content: 'Hello World!' }, { senderDisplayName: 'DevUser' });
Key Capabilities
- Voice & Video: HD calling, screen sharing, group calls.
- Chat: Real-time messaging, typing indicators, read receipts.
- SMS: Send and receive text messages programmatically.
- Telephony: Acquire phone numbers and make/receive PSTN calls.
Teams Interop
The killer feature is interoperability. An external user on your website can initiate a call that rings a Microsoft Teams client for your support staff. The staff member uses the Teams app they already know, while the customer stays in your branded web experience.
References
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.