Build a Video Call Website using Django & Agora

Sai Sandeep
2 min readJun 16, 2020

Live Video Calling feature for an application is always a big deal. Wait what if I say I can implement a video calling feature on your website within 5 mins? Sounds cool right? Well, I’m not kidding. This is what I’m gonna show you guys. I’ll be building a Video Calling Web Application With Agora and Django. Just before starting let’s get to know about Agora and what makes it different from others.

django

What is Agora and Why only Agora?

Agora delivers easy to embed Real-Time Engagement APIs which includes all the development tools and cloud infrastructure. Agora’s flexible APIs enable deep integration of high quality, extremely low latency voice, video, and live interactive streaming. It’s extremely high uptime, scalability and reliability put it apart from its competitors.

Prerequisites

  1. Agora Developer Account
  2. Python

Getting Started

  1. Create a Python Django Project using this line and change your directory
python -m startproject video_callingcd video_calling

2. Create a virtual env and activate it

python -m virtualenv envsource env/bin/activate #Linux and Mac Usersenv/Scripts/activate #windows users

3. Install Django and Django-Agora package using this command

python -m pip install django django-agora

4. Open settings.py file in video_call file directory and add agora in installed apps.

INSTALLED_APPS = [
...
'agora',
]

5. Open urls.py file in video_call file directory and add this before url_patterns.

from agora.views import Agora

6. Go to console.agora.io and create a new project. Once you’re done with it copy APP ID from the console and copy it to a file.

7. Now add this line to the url_patterns list and replace the app_id and channel_name. A Channel name can be a unique string. If you and your friend want to join a video call. You both need to have the same channel_name.

path('agora/',Agora.as_view(
app_id='<APP_ID>',
channel='<CHANNEL_NAME>'
)),

8. Done! Run the script using

python manage.py runserver

Finally, you can go to 127.0.0.1:8000/agora/ to start a video call.

I hope you liked it!

--

--