How to embed a coding lab from Fermion?
Before starting the embed process, you need two things:- A school on Fermion
- Fermion API key
Getting lab ID
Go toManage features
from your instructor dashboard and enable Coding labs
if you haven’t done that yet.

Coding lab
from sidebar and create a new IO lab.
Click on the Embed
button to obtain the ID of that lab.
Generating JWT
On any page in which you wish to let the user attempt the lab, you need to embed an iframe as follows:EMBED_URL
needs to be securely generated on your backend as follows:
- The embed URL will always contain the following part:
https://acme.fermion.app/embed/io-coding-lab?token=TOKEN_HERE
- After this, you need to generate a JWT (JSON Web Token) containing the following claims:The JWT token must be signed with your Fermion API Key. Example JWT: 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.
- Append this generated JWT token to the end to get the final embed URL.
EMBED_URL
securely on your backend server:
This example uses the jsonwebtoken package to generate a JWT Token.