In this article, I'll guide you through how to run DeepAR Web SDK using Ngrok.
In several easy steps, you will learn how to get a free public URL from Ngrok and run our Web SDK using that URL.

1. Ngrok setup

For Ngrok setup, the first thing you need is to go to the Ngrok web site and sign in.
After you sign in into Ngrok go to Ngrok Dashboard and follow the steps to download the ngrok installation file.

2. DeepAR Web SDK

The second thing that you need to do is prepare DeepAR Web SDK. For that, you need to go to a DeepAR developer. Log in or Sign up into a DeepAR developer.

After you finished that, go to Downloads and download the DeepAR Web SDK.

Put the Ngrok file that you download before, inside the example folder under the DeepAR Web SDK.

3. Local Host

Now we need to run a localhost server. For that, open the terminal and navigate to the example directory folder under DeepAR Web SDK, and run the script using this command:


Next, in the same example directory in the terminal run the ngrok command to start a HTTP tunnel on port 8888:

./ngrok http 8888

After running that command you will get this black screen with new ngrok URL.

Copy the new URL that you get, but without http/https.

4. Project setup

Go to the DeepAR developer and make a new project.
Under Applications choose Add web app.

For App name choose any name you want, and for Domain paste the domain that you copy from ngrok in terminal
Domain should look like down below, without http:// or https://

Hit Create app and you will get your App key.

Copy the App key that you get and paste that inside index.html under licenseKey.

That's it, now you can run it. Go to the ngrok domain on the web. Make sure that you entered the https:// before the domain.


And here it is, our DeepAR Web SDK running on Ngrok URL.

Did this answer your question?