Video Chat app using Gatsby and twilio-3

Photo by John Schnobrich on Unsplash

Welcome to part-3 of the series. You can find part-2 here.

We will finally start creating twilio function in this part. First click on the three dots in the left side of twilio dashboard page.

twilio dashboard

Next, if you scroll a bit down you will find Functions. Click on it.


In the next screen, click on Create a Function button.

Create a Function

A pop-up will appear in which you need to click on Blank and then Create button.


In the next page, we need to first give our function a name and a path. I gave it Create Token and /create-token respectively.

Create Token

Next, we need to first remove the checkbox and then remove everything inside the function.


Next, we will write some code in the function. This code will use some inbuilt twilio variables and get a new access token from our stored variables.

Some Code

After writing these three lines of code, click on Save button. After that click on the Configure link on the left side menu. It will open the below page.


We need to first enable the checkbox for Enable ACCOUNT_SID and AUTH_TOKEN. After that click on the + button next to KEY twice and enter API_KEY and API_SECRET in the KEY column.

The VALUE for both of them you will get from TWILIO_API_SID and TWILIO_API_SECRET, which you saved in the .env file in part-2.


After clicking on the Save button in the above screen, we need to click on the Manage link.


We need to click on the function name ie Create Token to go to the edit page. Next, we are adding the next four lines in the function. Here, we are doing a callback with the token with JWT.


We will continue with this function in the next part. You can find part-4 here.

You can also find the code for this project in this github link.




Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Bypassing OkHTTP3 Certificate Pinning

Outlook Quick. how to create and use

The USB 4.0 Standard — The Answer To Bandwidth Optimization For Video And Data

Integrating IOTA With Physical Devices

Low Code in Recruitment

Knowledge transfer process from a QA Engineer perspective

The only guide you need for a static website in Azure — Part 1 Create a static website

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nabendu Biswas

Nabendu Biswas

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

More from Medium

Bankist App: Banking made minimalist.

How to add google map API to your website & Fix google map API Errors

How to add google map API to your website & Fix google map API Errors

React App with Final Space API — Tinder Style

Building responsive web apps in less than a week using Postman!