How to create a video chat room with one API call using Daily.co

Daily.co is a service that allows developers to add video chat to an application or a web site quickly. There are many uses cases for Daily service. For example, you are building a customer service application and would like to add a built-in video feature. Another use case is for telemedicine type applications such as when a patient and doctor would like to do a video session (Dialy is HIPPA compliant).

There are two main ways to create a video chat room with Daily:

  1. Create a video chat room with Daily API
  2. Create a video chat room from a dashboard

Once you created a video chat room, you can click on its link to open it in a web browser. You can also embed it in an application or a web site. There are also many options to customize the room such as setting the maximum number of participants, if the text chat is enabled and others.

In this blog post you will learn how to create a room with an API call and also via a Daily dashboard.

Create a video chat room with Daily API

To create a new video room with a custom name (my-video-room) make a call to /rooms endpoint:

curl --request POST \ 
--url https://api.daily.co/v1/rooms \
--header 'authorization: Bearer api-key' \
--header 'content-type: application/json' \
--data '{"name":"my-super-room"}'

If you don’t specify a room name, a random room name will be generated.

The response looks like this:

{
"id":"f223c53e-ee55-4cea-a6ed-d9d21cb608fd"
"name":"my-super-room"
"api_created":true
"privacy":"public"
"url":"https://maxkatz.daily.co/my-super-room"
"created_at":"2020-10-15T20:02:47.511Z"
"config":{}
}

You can take the URL and open it in a web browser and the meeting will start. You can invite other people to join you.

Daily video chat room

Next I’m going to show you to create a video room using the Daily dashboard.

Create a video chat room from a dashboard

Using the Daily dashboard is perhaps even simpler.

From Daily dashboard main page click Rooms and then Create room button.

Daily dashboard

In the next step you can enter a room name and other settings, click Create room to see the following confirmation popup:

Creating new video room

After you click Create room, you will see the newly created room listed:

Video room list

You can click on the room name to see its details and settings. You can also click the 3-dot menu and copy the room link. Paste the link into a browser address bar and that’s it!

Daily provides powerful, yet simple and elegant API to create video chat rooms that you can embed into other applications. Definitely give it a try. In a future blog post I will show how to integrate Daily with Parabola via a webhook.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.