Learn how you can create IO coding labs inside Fermion interface and embed them externally
This article discusses integrating an IO coding lab externally on your website.
Before starting the embed process, you need two things:
Go to Manage features
from your instructor dashboard and enable Coding labs
if you haven’t done that yet.
Once done, open Coding lab
from sidebar and create a new IO lab.
Click on the Embed
button to obtain the ID of that lab.
On any page in which you wish to let the user attempt the lab, you need to embed an iframe as follows:
Here, the EMBED_URL
needs to be securely generated on your backend as follows:
https://acme.fermion.app/embed/io-coding-lab?token=TOKEN_HERE
labId
(String) – This is the unique identifier of the lab as mentioned above.userId
(String) – This is a string that you have stored in your database that can uniquely identify a given user. You have to ensure that you store this identifier properly in your database and reuse it every time a user tries to access any lab.Example JavaScript code to generate EMBED_URL
securely on your backend server:
This example uses the jsonwebtoken package to generate a JWT Token.
We have an OpenAPI-spec compliant public API you can use, once you have access to FERMION_API_KEY. You can use this API to query multiple data points for your organization.
Please check the API documentation here.
In case something doesn’t work right, or you have any doubt, please feel free to reach out to us at support@codedamn.com with your query, we’d be happy to resolve it at the earliest.