zenrtc_sdk 1.0.0
zenrtc_sdk: ^1.0.0 copied to clipboard
Flutter SDK for building one-to-one calls, group calls, meetings, contacts, and user management with ZenRTC.
ZenRTC Flutter SDK #
Transform your Flutter application into a secure, production-ready communication platform with the official ZenRTC Flutter SDK.
Add one-to-one audio/video calling, group calling, scheduled meetings, WebRTC data channels, user & contact management, push notifications, and built-in communication UI with just a few lines of code.
Built for scalability, ZenRTC includes ready-to-use dashboards, meeting management, CRUD APIs, Cloudflare TURN/SFU integration, HMAC-secured APIs, and support for Android, iOS, Web, Windows, and macOS, allowing you to ship a complete calling and collaboration experience in minutes.
Features #

- 📞 One-to-One Audio & Video Calling
- 👥 Group Audio & Video Calling
- 📅 Scheduled Meetings with Authentication & Invitations
- 💬 WebRTC Data Channels for Real-Time Data Transfer
- 🎥 Adaptive Audio & Video Quality Controls
- 🌐 Built-in STUN, TURN & SFU Support
- ⚡ Cloudflare TURN & SFU Adapter
- 👤 User, Device & Contact Management APIs
- 📱 Multi-Device Sign-in & Calling
- 🔔 Firebase Push Notification Integration
- 🖥️ Ready-to-use Dashboard & Meeting UI
- 📦 Built-in CRUD Screens & Bottom Sheets
- 🔒 HMAC SHA-256 API Authentication
- 🚀 Flutter SDK with Android, iOS, Web, Windows & macOS support
Requirements #
| Feature | Requirement |
|---|---|
| Notifications | Firebase Cloud Messaging (FCM), Callback API and Webhooks are supported |
| TURN Server | Cloudflare account with Calls TURN enabled |
| SFU | Cloudflare account with Calls SFU enabled |
| Signaling | ZenRTC Signaling Server |
Resources #
| Resource | Link |
|---|---|
| 🌐 ZenRTC Website | https://zenrtc.com |
| 📖 Flutter SDK Documentation | https://zenrtc.com/docs/flutter |
| 🎛️ ZenRTC Console (API Keys & Projects) | https://console.voyantnetworks.com |
| 🏢 Voyant Networks | https://voyantnetworks.com |
Getting API Credentials #
- Create a ZenRTC account.
- Create a new project from the ZenRTC Console.
- Copy your:
Account IDProject IDAPI KeyAPI Secret
- Initialize the SDK using these credentials.
Installation #
dependencies:
zenrtc_sdk: ^1.0.0
Example Application #
The package includes a complete Flutter example demonstrating all major ZenRTC SDK features.
Dashboard #
Manage your communication workspace from a single dashboard.

One-to-One & Group Calling #
Start audio/video calls, receive incoming calls, and manage active conversations.

Meetings #
Create, join and manage scheduled meetings.

Create Meeting #
Configure meeting authentication, schedule, participants and permissions.

Contacts #
Browse and manage your contacts.

Create Contact #
Import or create contacts with additional information.

Profile #
Manage your profile and account settings.

Complete Demo #
The example application demonstrates all built-in screens, helper APIs, CRUD operations, meetings, calling, contacts, and dashboard functionality.

flutter pub get
Initialize Signaling Setup #
final navigatorKey = GlobalKey<NavigatorState>();
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await ZenRtcSocket.instance.ensureInitialized(
accountId: "0000000000000e59",
projectId: "00000000000ab4a1",
apiKey: "601854e01cc07cced4589eff4ffe4276",
apiSecret:
"830047425cd8bc3a2a1681cd9299b49d64f50b574537ad39545994f98039ebb3",
testMode: true,
navigatorKey: navigatorKey,
);
runApp(const DemoApp());
}
Wrap your app:
OverlaySupport.global(
child: MaterialApp(
navigatorKey: navigatorKey,
builder: (_, child) {
return ZenRtcAppShell(
child: child!,
);
},
home: const HomeScreen(),
),
);
//connect
Future<void> _connectAs(BuildContext context, String userId) async {
await ZenRtcSocket.instance.setIdentity(
UserIdentityModel(userId: userId, deviceId: "device_1"),
);
await ZenRtcSocket.instance.connect();
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text("Connected as $userId"),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
);
}
}
Helper Functions #
Dashboard & Navigation #
ZenRtcHelper.pushDashboardScreen(
context: context,
);
ZenRtcHelper.pushPendingCallsScreen(
context: context,
);
Meetings #
ZenRtcHelper.pushCreateMeetingsScreen(
context: context,
);
ZenRtcHelper.pushMyMeetingsScreen(
context: context,
);
Contacts #
ZenRtcHelper.pushCreateContactsScreen(
context: context,
);
ZenRtcHelper.pushMyContactsScreen(
context: context,
);
Profile #
ZenRtcHelper.pushMyProfileScreen(
context: context,
);
One-to-One Calling #
ZenRtcHelper.pushOneToOneCallScreen(
context: context,
callType: CallSessionType.video,
receiverUserId: "user_2",
);
Group Calling #
ZenRtcHelper.pushGroupCallScreen(
context: context,
);
User Management #
ZenRtcHelper.showUserScreen(
context: context,
crudClient: crudClient,
);
ZenRtcHelper.showUserBottomSheet(
context: context,
crudClient: crudClient,
);
Device Management #
ZenRtcHelper.showRegisterDeviceScreen(
context: context,
crudClient: crudClient,
);
ZenRtcHelper.showRegisterDeviceBottomSheet(
context: context,
crudClient: crudClient,
);
CRUD Client (Simple REST methods) #
Create User #
Creates a new user in your ZenRTC project.
Flutter SDK #
final crudClient = ZenRtcCrudClient(
accountId: "...",
projectId: "...",
apiKey: "...",
apiSecret: "...",
testMode: false,
);
final response = await crudClient.createUser(
userId: "user_1",
displayName: "John Doe",
);
if (response.success) {
// User created
}
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/users/create
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"userId": "user_1",
"displayName": "John Doe"
}
Success Response
{
"success": true
}
Create Multiple Users #
Creates multiple users in a single API request.
Flutter SDK #
final response = await crudClient.createUsers([
ZenRtcUser(
userId: "user_1",
displayName: "John",
),
ZenRtcUser(
userId: "user_2",
displayName: "Alice",
),
]);
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/users/bulk-create
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"users": [
{
"userId": "user_1",
"displayName": "John"
},
{
"userId": "user_2",
"displayName": "Alice"
}
]
}
Success Response
{
"success": true
}
Update User #
await crudClient.updateUser(
userId: "user_1",
displayName: "John Smith",
);
Delete User #
await crudClient.deleteUser(
userId: "user_1",
);
Devices #
Note: Every user has a default device with the ID
"default". If your application only supports a single device per user, use"default"as the device ID.
Register Device #
Registers a new device for a user.
Flutter SDK #
final response = await crudClient.createDevice(
userId: "user_1",
deviceId: "default",
deviceName: "Pixel 9",
firebaseToken: "...", // Optional
);
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/devices/create
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"userId": "user_1",
"deviceId": "default",
"deviceName": "Pixel 9",
"firebaseToken": "..."
}
Success Response
{
"success": true
}
Update Device #
Updates an existing registered device.
Flutter SDK #
final response = await crudClient.updateDevice(
userId: "user_1",
deviceId: "default",
deviceName: "Pixel 9 Pro",
firebaseToken: "...",
);
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/devices/update
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"userId": "user_1",
"deviceId": "default",
"deviceName": "Pixel 9 Pro",
"firebaseToken": "..."
}
Success Response
{
"success": true
}
Get Devices #
Returns all registered devices for a user.
Flutter SDK #
final response = await crudClient.getDevices(
userId: "user_1",
);
if (response.success) {
print(response.devices);
}
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/devices/read
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"userId": "user_1"
}
Success Response
{
"success": true,
"data": {
"default": {
"deviceName": "Pixel 9",
"firebaseToken": "..."
},
"tablet": {
"deviceName": "Galaxy Tab",
"firebaseToken": "..."
}
}
}
Delete Device #
Deletes a registered device.
Flutter SDK #
final response = await crudClient.deleteDevice(
userId: "user_1",
deviceId: "default",
);
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/devices/delete
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"userId": "user_1",
"deviceId": "default"
}
Success Response
{
"success": true
}
Contacts #
Imports or updates multiple contacts for a user.
Flutter SDK #
final response = await crudClient.createContacts(
userId: "user_1",
contacts: [
ZenRtcContact(
contactUserId: "user_2",
displayName: "Alice",
nickName: "Office",
description: "Project Manager",
emails: [
"alice@example.com",
],
phones: [
"+911234567890",
],
),
],
);
Raw HTTP Request #
Endpoint
POST https://api.zenrtc.com/v1/contacts/bulk-create
Headers
Content-Type: application/json
x-signature: <HMAC_SHA256_SIGNATURE>
Request Body
{
"accountId": "0000000000000e59",
"projectId": "00000000000ab4a1",
"apiKey": "601854e01cc07cced4589eff4ffe4276",
"nonce": "ab12cd34ef",
"timestamp": 1753170215000,
"userId": "user_1",
"contacts": [
{
"contactUserId": "user_2",
"displayName": "Alice",
"nickName": "Office",
"description": "Project Manager",
"emails": ["alice@example.com"],
"phones": ["+911234567890"]
}
]
}
Success Response
{
"success": true
}
Media Quality #
ZenRtcSocket.instance.mediaQualityModel =
const MediaQualityModel(
videoQuality: VideoQuality.p720,
audioQuality: AudioQuality.hd,
);
Available video presets:
autop360p480p720p1080p2kp4k
Available audio presets:
autovoicestandardhdstudio
Push Notifications #
ZenRtcSocket.instance.onPushNotificationRequired = (payload) {
// Send push notification from your backend.
};
Example #
A complete working application demonstrating:
- User management
- Device management
- Contacts
- One-to-one calling
- Group calling
- Meetings
- Dashboard
- CRUD screens
is available in the example/ directory.
License #
MIT License
Copyright (c) 2026 ZenRTC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.