How to embed an Ebook externally
This guide explains how to embed ebooks into external websites.
Each ebook on fermion has a unique identifier. For example 6779080e80ec97e953a17971
. First, go to Manage features
tab on your instructor dashboard and enable Digital products
After that, go to eBooks
inside Digital products
to create and upload an ebook if you haven’t.
You can find the ebook digital product ID in the URL.
You’ll need to generate a JWT (JSON Web Token) to authenticate the embed. Here’s how to create one using the jsonwebtoken
package:
The payloadObject
must conform to the following zod schema:
Important notes:
FERMION_API_KEY
with your actual API key and provide a unique user ID for each viewer.:::info Fermion uses the same zod schema as above internally to validate your JWT payload. :::
Add this iframe to your website where you want to embed the ebook:
:::tip
Make sure you replace acme.fermion.app
with your fermion school URL.
:::
This should embed your ebook and display it on your website.