How to Embed Video Conferencing on Your Website in Four Steps
Embedding a video conferencing API lets you add video conferencing to your website or app without building WebRTC infrastructure from scratch. With Digital Samba, you create a room through the REST API, generate a participant token, then load the prebuilt video interface with the JavaScript SDK or a simple iframe – typically in under an hour. This guide walks through the full process, with code examples, a WordPress option and answers to common questions.
Whether you are building a virtual classroom, supporting remote teams or running telehealth consultations, a reliable video conferencing API lets you keep video calls on your own domain instead of sending users to a third-party tool. Below you will find every step, from creating your account to customising the embedded call with the SDK.
Table of contents
- Why add video conferencing to your website?
- How to embed video calls on your website using Digital Samba Embedded
- Customising the embedded video call experience with the Digital Samba SDK
- Using SDK events and methods to control calls in real time
- Add video conferencing to WordPress with the Digital Samba plugin
- Take your website further with embedded video conferencing
- FAQ: How to embed video conferencing on your website
Why add video conferencing to your website?
Adding video conferencing to your website keeps the whole interaction – booking, conversation and follow-up – inside your product, under your brand. Your users never leave your domain, you control the experience end to end, and you avoid asking customers to install or trust a separate meeting app.
The pattern fits any product where people need to talk face to face: online learning platforms, telehealth services, customer support, recruitment, legal consultations and remote team tools. In each case, embedded video turns your website from a brochure into the place where the actual work happens. We cover the business case in more depth in our guide to the advantages of embedding video calls in your app.
The practical question is how to do it without months of WebRTC development. That is what an embedded video conferencing platform solves: the provider runs the infrastructure, and you integrate a ready interface through an API, an SDK or a plain iframe.
How to embed a video conferencing API in four steps
- Choose a provider. Pick a video API that fits your needs – prioritise GDPR compliance, customisation and time to integrate.
- Get your API credentials. Create an account and copy your Team ID and Developer key from the Team section of the provider's dashboard.
- Create a room via the REST API. Send a POST request to the provider's API to create a room and, for private rooms, generate a participant token (a JWT).
- Embed the interface. Paste an iframe with the room URL, or install the SDK via npm or a script tag and load the prebuilt video component into your frontend.
The sections below show exactly how to do this with Digital Samba.
How to embed video calls on your website using Digital Samba Embedded
You can add live video calls to your website in a few steps using Digital Samba Embedded. Whether you want a quick HTML embed or full control via the API and SDK, this section walks through each option, from basic to advanced.
Set up a Digital Samba account and get your credentials
First, sign up for a free Digital Samba account.
Once you're in, open the Team section of the dashboard to find your Team ID and Developer key – these are the credentials that authenticate your API requests. The Developer key also signs participant tokens, so treat it like a password and keep it on your server.
Understanding the Digital Samba integration options
1. The HTML iframe embed
The simplest option. Create a room, then place an iframe with the room URL anywhere in your HTML. No build step, no JavaScript – the full video interface loads inside your page.
2. The REST API
The backend layer. Use it to create rooms, assign roles, manage recordings and connect video sessions to the rest of your stack. This is the right tool when rooms need to be created programmatically – one per lesson, consultation or support ticket.
3. The JavaScript SDK
The frontend layer. The SDK embeds the same prebuilt interface but gives your code control over it: you can set the user's name and language before joining, react to in-room events in real time and call methods such as muting or ending the session.
Creating a video conferencing room with the REST API
To create a room, send a POST request to the /rooms endpoint, authenticating with your Team ID and Developer key. The only required field is privacy. Here's an example that also sets a friendly URL and roles:
curl --request POST \
--header "Content-Type: application/json" \
--url https://api.digitalsamba.com/api/v1/rooms \
--user YOUR_TEAM_ID:YOUR_DEVELOPER_KEY \
--data '{
"privacy": "public",
"friendly_url": "my-first-room",
"roles": ["moderator", "speaker", "attendee"],
"default_role": "attendee"
}'
The response includes the room's details, and the room becomes available at https://YOUR_TEAM.digitalsamba.com/my-first-room. If you skip friendly_url, the API generates one for you. See the room creation docs for the full field list.
The privacy setting determines who can access the room:
- Public: anyone with the room URL can join – the easiest way to start and to invite participants.
- Private: participants need a valid token to enter, even if they know the URL – the right choice for consultations, lessons and anything access-controlled.
Roles define what participants can do in the room. Digital Samba provides preset roles, and you can create custom ones with their own permission sets:
- Moderator: full control, including managing participants and room settings.
- Speaker: can broadcast and present, without moderation rights.
- Attendee: view-focused access, ideal for larger audiences.
When a room has more than one role, you must set a default_role – the role applied to anyone who joins without a token. Keep it the least powerful role, so nobody enters as a moderator by accident.
Prefer clicking to coding? You can create and configure the same rooms visually – see our guide on how to configure your Digital Samba rooms using the dashboard.
Generating a participant token for private rooms
Private rooms authenticate participants with a JWT token. You can sign tokens yourself with any JWT library, using your Developer key as the secret, or request them from the REST API. A token carries a few short claims:
- td – your team ID
- rd – the room ID or room name
- u – the participant's display name
- role – optional role for this participant, such as moderator
- ud – optional external user ID, useful for mapping participants to your own user accounts
Signing tokens on your own server is the better route when you issue many tokens at once, since the API is rate-limited. The token docs include ready-made examples in several languages.
Embedding the room with an iframe or the SDK
For the quickest result, embed the room with a plain iframe. The allow attribute matters – without it, the browser blocks camera and microphone access inside the frame:
<iframe src="https://YOUR_TEAM.digitalsamba.com/my-first-room" allow="camera; microphone; display-capture; autoplay" style="width: 100%; height: 600px; border: 0;"> </iframe>
For production integrations, the SDK is the recommended route. It is distributed as the @digitalsamba/embedded-sdk npm module, and for quick prototyping you can load it from a CDN:
<script crossorigin src="https://unpkg.com/@digitalsamba/embedded-sdk"></script>
<script>
const sambaFrame = DigitalSambaEmbedded.createControl({
url: 'https://YOUR_TEAM.digitalsamba.com/my-first-room'
});
sambaFrame.load();
</script>
Or, with npm and a bundler:
npm install @digitalsamba/embedded-sdk
import DigitalSambaEmbedded from '@digitalsamba/embedded-sdk';
const sambaFrame = DigitalSambaEmbedded.createControl({
url: 'https://YOUR_TEAM.digitalsamba.com/my-first-room'
});
sambaFrame.load();
That's the whole integration: the prebuilt interface loads inside your page, with screen sharing, chat and the rest of the feature set already working.
Customising the embedded video call experience with the Digital Samba SDK
The SDK gives you control over how the embedded call starts and where it lives on your page, so the room feels like a native part of your product rather than a bolt-on.
Initialising the DigitalSambaEmbedded class
Everything starts with the DigitalSambaEmbedded class. You can initialise it with the constructor, which loads the room immediately, or with the createControl factory method, which lets you decide later when to call load() – useful when the room should only appear after a user action, such as clicking 'Join lesson'.
Setting initialisation options (InitOptions)
InitOptions control where and how the room is embedded:
- root: the HTML element the video frame is created inside. Without it, the iframe is appended to the page's body tag.
- frame: an existing iframe element to load the room into, if you prefer to manage the iframe yourself.
- url: the full room URL to load.
- team and room: the team and room names, as an alternative to passing the URL.
- token: an optional JWT string for authentication, mainly for private rooms.
For example, to load the room inside a specific container element:
import DigitalSambaEmbedded from '@digitalsamba/embedded-sdk';
const container = document.querySelector('#video-call-container');
const sambaFrame = DigitalSambaEmbedded.createControl({
url: 'https://YOUR_TEAM.digitalsamba.com/my-first-room',
root: container,
token: 'PARTICIPANT_TOKEN_IF_PRIVATE'
});
sambaFrame.load();
Configuring room settings on join
The optional roomSettings object defines what happens when a user enters the room. Among other things, you can:
- Enable or disable the camera and microphone on entry (videoEnabled, audioEnabled).
- Pick the initial media devices (mediaDevices: video input, audio input, audio output).
- Set the app language, the user's name and custom initials for their tile (appLanguage, username, initials).
- Choose the layout mode – auto or tiled (layoutMode).
- Show or hide the toolbar, topbar and captions panel (showToolbar, showTopbar, showCaptions).
- Apply a virtual background or blur, including your own background collection (virtualBackground, virtualBackgrounds).
- Skip or show the join screen (joinScreenEnabled), and mute the frame on join (muteFrame).
Here's a typical configuration:
const sambaFrame = DigitalSambaEmbedded.createControl({
url: 'https://YOUR_TEAM.digitalsamba.com/my-first-room',
roomSettings: {
username: 'Jane Smith',
initials: 'JS',
appLanguage: 'en',
layoutMode: 'tiled',
videoEnabled: false,
audioEnabled: false,
virtualBackground: { blur: 'balanced' }
}
});
sambaFrame.load();
After setting InitOptions and roomSettings, calling load() embeds the configured room into your page. For every option and the valid combinations, see the DigitalSambaEmbedded class documentation, and for a worked example read our tutorial on how to embed a video conference widget with the Digital Samba SDK.
Using SDK events and methods to control calls in real time
The SDK exposes real-time events and control methods, so your frontend can react to what happens in the room – users joining, hands raised, audio toggled – and act on it from your own code.
Subscribing to events
Subscribe with on(), unsubscribe with off(), or use once() for one-time subscriptions. The SDK emits events such as userJoined, userLeft, handRaised, handLowered, audioEnabled, audioDisabled, recordingStarted and many more:
const onUserJoined = (event) => {
console.log('A participant joined:', event);
};
sambaFrame.on('userJoined', onUserJoined); // subscribe
sambaFrame.off('userJoined', onUserJoined); // unsubscribe
Want to show a message when someone leaves the call? Use the userLeft event:
sambaFrame.on('userLeft', () => {
showNotification('A participant has left the call');
});
For debugging, subscribe to '*' to log every event the room emits – handy in development environments:
sambaFrame.on('*', (event) => console.log('SDK event:', event));
Controlling the call with methods
Methods let your code act on the room. Initialise the SDK and load the room first, and wait for the userJoined event before calling methods that affect the local user. A few examples:
- enableVideo() / disableVideo(): turn the user's camera on or off.
- requestUnmute(): ask a remote participant to unmute – they see a pop-up and can accept or decline, which keeps microphone control with the user.
- endSession(): end the session for everyone in the room.
sambaFrame.on('userJoined', () => {
sambaFrame.enableVideo(); // start the local camera
});
sambaFrame.requestUnmute(participantId); // ask a participant to unmute
sambaFrame.endSession(); // end the call for everyone
For a complete walkthrough of joining, moderating and reacting to room activity from code, see our guide on how to join and control the embedded video conference with the Digital Samba SDK. And if your backend needs to know about room events too, you can use webhooks to integrate Digital Samba into your platform.
Add video conferencing to WordPress with the Digital Samba plugin
If your website runs on WordPress, you can embed GDPR-compliant video calls without touching the API at all, using the free Digital Samba Embedded WordPress plugin. The rooms it creates are the same Digital Samba rooms, with screen sharing, chat and virtual backgrounds included.
The setup takes a few minutes:
- Install the plugin from the WordPress Plugin Directory and activate it.
- Connect your account: in the plugin settings, enter your Team ID, Developer key and domain name, then save. Both values come from the Team section of your Digital Samba dashboard.
- Create a room: click Add New Room in the plugin menu, name the room and adjust its settings – each option comes with a short description.
- Publish and embed: every room gets a shortcode. Paste it into any page or post to display the room there, or share the room's permalink directly. You can also restrict rooms to logged-in users in the plugin settings.
If you're new to shortcodes, the WordPress documentation explains how to place them. For anything beyond simple embedded rooms – custom join flows, tokens per user, event handling – switch to the API and SDK route described above.
Take your website further with embedded video conferencing
You now have the full picture: create a room through the REST API, issue tokens for private access, embed the interface with an iframe or the SDK, and customise the experience with roomSettings, events and methods. Developers get full programmatic control, and WordPress users get a no-code path to the same GDPR-compliant rooms.
Ready to bring real-time video to your platform?
Start building with Digital Samba today, or talk to our team about the best way to integrate video conferencing into your website.
FAQ: How to embed video conferencing on your website
1. What is an embedded video conferencing API?
An embedded video conferencing API lets you add real-time video calls directly to your website or app without building WebRTC infrastructure yourself. You use the API to create and manage rooms on the backend, and an SDK or iframe to display the video interface on the frontend.
2. How do I embed a video call on my website?
Create a room via the Digital Samba REST API, generate a participant token if the room is private, then load the prebuilt video interface with the JavaScript SDK or a simple iframe. No WebRTC development is required, and a basic embed can be live in under an hour.
3. What is the fastest way to embed video chat into my website?
The fastest way is an iframe embed. Create a public room, paste an iframe with the room URL into your HTML, and the call interface loads on your page with no development work.
4. What is the difference between a video conferencing API and an SDK?
A video conferencing API manages backend tasks such as creating rooms and setting participant roles, while the SDK controls the frontend, including how the call looks and behaves on your site. Most integrations use both together. We unpack the distinction in our API vs SDK guide.
5. What credentials do I need to use the Digital Samba API?
You need your Team ID and Developer key, both shown in the Team section of the Digital Samba dashboard. The Developer key authenticates your REST API requests and signs participant tokens, so keep it on your server and never expose it in frontend code.
6. Can I try the Digital Samba API before paying?
Yes. Digital Samba has a free plan that includes 10,000 participation minutes per month, with no card required, so you can build and test the API and SDK before scaling. Current plans are listed on the pricing page.
7. Can I embed a video call into a WordPress site?
Yes. Digital Samba provides an official WordPress plugin that adds fully functional video rooms to any page or post using shortcodes, with no coding required. It connects with the same Team ID and Developer key used by the API.
8. Is Digital Samba GDPR-compliant?
Yes. Digital Samba is a European provider and hosts meeting data on EU servers, with encryption in transit and at rest and optional end-to-end encryption. That makes it suitable for healthcare, education and other privacy-sensitive sectors.
9. How many people can join an embedded Digital Samba room?
A room supports up to 100 participants when everyone can broadcast, or up to 500 participants with up to 15 simultaneous broadcasters. The right configuration depends on your use case.
10. Can I brand the embedded video interface?
Yes. You can customise logos, colours and fonts, and white-label options extend to the domain your rooms run on. The SDK adds runtime control too, such as changing branding colours and the layout mode from your own code.
11. Can I pre-fill the participant's name and skip the join screen?
Yes. Pass a roomSettings object when initialising the SDK: username pre-fills the participant's name, and setting joinScreenEnabled to false skips the join screen. You can set the app language, initials and starting devices the same way.
12. Can I set participant permissions by default?
Yes. Assign roles when creating a room and set a default_role for anyone who joins without a token. Each role defines permissions such as broadcasting, screen sharing and moderation, and you can create custom roles via the API or dashboard.
13. Does Digital Samba have API documentation?
Yes. Full developer documentation is available at docs.digitalsamba.com, covering the REST API, the JavaScript SDK, webhooks and code examples in multiple languages.
Share this
You May Also Like
These Related Stories

Configuring your Digital Samba rooms with the developer API and SDK

How to Join and Control an Embedded Video Conference with the Digital Samba SDK

