DEV Community

Max Katz
Max Katz

Posted on • Originally published at maxkatz.org on

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"}'
Enter fullscreen mode Exit fullscreen mode

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":{}}
Enter fullscreen mode Exit fullscreen mode

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.

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

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

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.

Top comments (0)