Learn how to set up Base URL with ngrok, an SSH tunneling service.
In the Developer Portal, some extensions have a Base URL field. This indicates that the extension must provide the URL of a server that can receive and respond to HTTP requests from Canva. You can use any programming language, framework, or architecture to handle these requests.
This tutorial explains how to set up a Base URL with:
​Express.js - A minimal web framework for Node.js.
​ngrok - A free CLI that exposes a local server via a publicly accessible URL.
ngrok is a useful tool, but it has inherent security risks, such as someone figuring out the URL of your server and accessing proprietary information. Be mindful of the risks, and if you're working as part of an organization, talk to your IT department.
Step 1: Install Node.js
To check if Node.js is installed, run the following command:
For Canva to send requests to a local server, it needs to be exposed via a publicly available URL. One of the easiest ways to do this is with ngrok.
ngrok is a free tool that creates a secure tunnel to a local server. You can create tunnels without an account, but the tunnels expire after a few hours of activity. If you have an account, the tunnels don't expire.
To install ngrok, run the following command:
1
npminstall ngrok --global
Copied!
To verify that ngrok is installed, run the following command:
To start an ngrok tunnel, run the following command in a separate terminal while the local server is still running:
1
ngrok http 3000
Copied!
This command assumes the port of the local server is 3000.
After running this command, ngrok provides a HTTPS-enabled URL that can receive requests from Canva. You can enter this URL into the extension's Base URL field.