The Genially API lets your organization search and browse team content — spaces, folders and geniallys — read the detail of any genially it can access, read the tracking analytics of published geniallys, and receive webhook events as activity happens. It is designed for the development and data teams building on top of Genially.
Credentials are managed from your team settings (app.genially.com/teams/{teamId}/settings): OAuth applications, personal access tokens and team access tokens.
Base URL
All API requests are made to the following base URL over HTTPS. The API is versioned in the path.
https://developer-api.genially.com/v1
What you can do
List the spaces of your team, the folders inside a space, and the geniallys of a space or a folder — with cursor pagination on the spaces and geniallys listings.
Search the geniallys you can access by name.
Get the detail of a genially by ID: owner, space and folder, privacy state, collaborators and their access level, and links to the view and the editor.
Read the tracking analytics of a published genially: per-user sessions and per-question answers, or aggregated visits per day, per slide and per interaction.
Receive webhook events on your endpoint as they happen — slide views, interactive question answers and LTI sessions.
Pagination
Every listing returns a plain JSON array. The spaces and geniallys listings are always newest first (creation order) and paged with a cursor: ask for a page size with limit (1 to 50, 48 by default) and, to get the next page, send last with the id of the last item you received, omitting it on the first call; the cursor continues downwards from that item. The folders listing is not paginated: it filters with parentId and defaults to the same newest-first order unless you sort it with sortBy/sortDirection.
Walking a listing
# First pagecurl"https://developer-api.genially.com/v1/spaces?limit=50" \
-H "Authorization: Bearer $ACCESS_TOKEN"# Next page: last = id of the last item of the previous pagecurl"https://developer-api.genially.com/v1/spaces?limit=50&last=64f1c2a0d2b4a90012f3e001" \
-H "Authorization: Bearer $ACCESS_TOKEN"
The response carries no cursor and no "has more" flag: you have reached the end when a page comes back with fewer items than limit. Note that an id sent as last that no longer exists — a deleted genially, for instance — also returns an empty array, so keep your own cursor from an item you have just read.
Next steps
Get started
Quickstart
Go from zero to your first authenticated API call in three steps.
1. Create a personal access token
In your team settings — app.genially.com/teams/{teamId}/settings/personal-access-tokens — create a personal access token. Copy the gy_... value right away: it is shown once. The token acts as you within that team — no OAuth flow, no client registration. See the Authentication guide for team tokens and OAuth applications.
2. Make your first call
Send the token as a bearer credential. Your team is derived from the token itself — no extra parameters needed. List the spaces of your team:
Every endpoint takes the same Authorization header. Looking for something by name? GET /v1/geniallys/search?term=onboarding returns the geniallys you can access that match the term. Once you have an id, GET /v1/geniallys/{geniallyId} returns the detail of that genially: owner, location, privacy, collaborators and links.
Get started
Authentication
Every request to the API carries a bearer credential in the Authorization header. The fastest way to get one is an access token — personal or team — created from your team settings. For integrations that obtain tokens programmatically, the API is also an OAuth 2.1 resource server backed by auth.genially.com.
Access tokens
Access tokens are opaque strings prefixed with gy_ — no OAuth flow involved. Create one in your team settings and start calling the API immediately:
Token
Acts as
Create it at
Personal
You, inside the team where it was created. Sees what you can access.
The token value is shown once, at creation — only a 4-character preview is kept for identification. Pick an expiration of 30 to 365 days (90 by default) or no expiration, and rename, deactivate or delete a token at any time from the same page. Each scope holds up to 20 active tokens with unique names.
Some endpoints distinguish the two: a team token reaches every space of its team, while a personal token sees the spaces its user can access — and the global tracking analytics endpoint requires a user-bound credential that also carries a team.
OAuth: register a client
When you are building an application — a partner backend, a CLI, an app acting on behalf of Genially users — register an OAuth client from your team settings (app.genially.com/teams/{teamId}/settings/team-oauth-app), or directly against the auth server (POST /oauth/register) from an authenticated Genially session. The client type is set by its token_endpoint_auth_method:
Client type
Token auth
Grants
Confidential — partner backends
client_secret_basic client_secret_post
All grants. Bound to a team at registration; its tokens carry that team.
Public — CLIs, SPAs, desktop apps
none
Authorization code + refresh only. PKCE instead of a secret; redirect URIs required. Its tokens carry no team, so the team-scoped v1 endpoints — today, all of them — reject them with 400.
The client_secret is returned once, at registration. Store it securely — only a 4-character preview is kept for identification.
Server to server: client credentials
Confidential clients exchange their credentials directly for a token. No user interaction; the token acts on the team the client is bound to.
Send the user to Genially in the browser. If they have no Genially session, they are asked to sign in; then they are redirected straight back to your redirect_uri with a code — there is no separate consent screen. For a client bound to a team, a user who is not a member of that team comes back with error=access_denied instead. PKCE with S256 is mandatory for every client, and only response_type=code is supported. This flow also returns a refresh token.
Authorization code flow
# 1. Send the user to Genially to sign inGET https://auth.genially.com/oauth/authorize
?response_type=code
&client_id=$CLIENT_ID
&redirect_uri=https://yourapp.example/callback
&code_challenge=$PKCE_CHALLENGE
&code_challenge_method=S256
&state=$STATE
&resource=https://developer-api.genially.com# 2. Exchange the code delivered to your redirect_uriPOST https://auth.genially.com/oauth/tokengrant_type=authorization_codecode=$CODEclient_id=$CLIENT_IDredirect_uri=https://yourapp.example/callbackcode_verifier=$PKCE_VERIFIER# → 200 OK
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "...",
"refresh_token_expires_in": 2592000
}
Before exchanging, verify that the state delivered to your callback matches the one you generated in step 1 — discard the code if it does not. The exchange always carries the client_id the code was issued to. A confidential client also authenticates with its client_secret (body or Basic header); a public client sends the client_id alone — the server rejects a public client that sends a secret.
Refreshing: post grant_type=refresh_token with the refresh_token and your client_id to the same token endpoint, authenticating exactly as in the code exchange. Refresh tokens are single-use and rotated on every refresh; reusing a spent one revokes the whole session. Access tokens last 1 hour, refresh tokens 30 days.
Call the API
Whichever credential you use — a personal or team access token, or an OAuth access token from a confidential client — send it as a bearer credential on every request.
Every request is checked against the plan of the team the credential acts on — the team of an access token, or the team_id of an OAuth token. When that plan does not include the Developer API, for example after a downgrade, the request is rejected with 403 before reaching any endpoint:
GET /v1/spaces
curl https://developer-api.genially.com/v1/spaces \
-H "Authorization: Bearer gy_4f0f..."# → 403 Forbidden
{ "error": "Your team plan does not include the Developer API" }
Your tokens and OAuth clients are left untouched: once the team is back on a plan that includes the Developer API, the same credentials work again. This API caches each team's answer for up to 30 seconds, so a plan change takes that long to apply in either direction.
OAuth token claims
OAuth-issued tokens are signed JWTs (access tokens created in settings are opaque gy_ strings and carry no claims). There are no OAuth scopes — what a token can do is derived from its user, team and grant type.
Claim
Meaning
iss
Always the Genially auth server, https://auth.genially.com.
sub
The user id (authorization code) or the client id (client credentials).
aud
The resource the token was minted for — https://developer-api.genially.com for this API.
client_id
The OAuth client that obtained the token.
grant_type
authorization_code or client_credentials.
team_id
Confidential clients only: the team the client was registered for. Public-client tokens are user-scoped and carry no team — and since every v1 endpoint acts on the single team resolved from the token, a public-client token is rejected with 400 on all of them. Use a confidential client, or an access token, to call the API.
exp
One hour after issuance (expires_in: 3600).
OAuth tokens are audience-scoped: always request resource=https://developer-api.genially.com. A token minted for another Genially resource is rejected with 401, and an unknown resource fails at the token endpoint with invalid_target.
Disabling and deleting a client
The team that owns a client manages it from app.genially.com/teams/{teamId}/settings/team-oauth-app. Three actions change what the client can do, and they differ in what happens to the tokens it has already issued.
Action
New authorizations and token requests
Tokens already issued
Disabled
/oauth/authorize answers 400 and /oauth/token answers 401 — both invalid_client, described as OAuth client is disabled, on every grant including a refresh.
Rejected with a bare 401. Nothing is invalidated: re-enable the client and they are accepted again, with no user having to authorize a second time.
Deleted
The same two answers, described as OAuth client has been deleted. Permanent — the client id never comes back.
Invalidated at the moment of deletion. A new client and a fresh authorization are the only way back.
Secret rotated
The client keeps working — authenticate with the new secret from then on.
Invalidated: every token minted before the rotation stops being accepted.
New authorizations and token requests are blocked the moment a client is disabled, because the auth server checks its state on every call. Tokens already in flight take a little longer: this API caches client state for up to 30 seconds, so one can still be accepted for that long after the switch — and re-enabling takes just as long to take effect.
REST API
Geniallys
Every endpoint of this resource — parameters, response shape, examples and errors.
REST API · Geniallys
Search geniallys by name
Search geniallys by name. Works with both credential kinds: a team token searches every genially of the team, while a user-bound credential — a personal access token, or an authorization-code OAuth token from a confidential client — searches the geniallys that user can access.
GET/v1/geniallys/searchauth: Bearer token
Query parameters
term: string · optional
Text to match against the genially name. Omit it to match every name.
limit: integer · optional
How many geniallys to return in one page. · 1–50 · Defaults to 48
last: string · optional
Pagination cursor: the id of the last genially of the previous page. Omit it to get the first page.
limit is out of the 1–50 range, or last is empty. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
REST API · Geniallys
Get a genially by ID
Returns the detail of a genially. Works with both a personal and a team token: the team is taken from the token, so no team parameter is sent. The response includes identity and dates, the owner (id, email, nickname), its space and folder, the privacy state (draft, anyone with the link — with password, search-engine visibility and reusability flags — or restricted), the collaborators it is shared with (people, team groups or the whole team, each with edit or view access), a thumbnail, a view link (only when published) and an editor link. Returns 401 without a token, 403 when the genially exists but falls outside the token scope, and 404 when it does not exist, is in the trash or is disabled (indistinguishable).
GET/v1/geniallys/{geniallyId}auth: Bearer token
Path parameters
geniallyId: string
Id of the genially, as returned by the listing endpoints.
Kind of genially, such as Presentation or Infographic.
createdAt: string
When it was created, as an ISO 8601 timestamp.
lastModifiedAt: string
Last edit, as an ISO 8601 timestamp.
publishedAt: string · optional
When it was first published. Omitted while it is a draft.
▸owner: object
Who owns the genially.
id: string
User id of the owner.
email: string · optional
Email of the owner.
nickname: string · optional
Nickname of the owner.
teamId: string · optional
Team the genially belongs to.
spaceId: string · optional
Space the genially lives in.
▸folder: object · optional
Folder it lives in. Omitted when it sits at the root of its space.
id: string
Folder id.
name: string · optional
Folder name.
▸collaborators: array of object
Who the genially is shared with. Empty when it is not shared.
type: string
One of: user, group, team
access: string
What this collaborator can do. · One of: edit, view · Only when collaborators[].type is user
id: string · optional
User id. Omitted for someone invited by email who has no account yet. · Only when collaborators[].type is user
email: string · optional
Email the genially was shared with. · Only when collaborators[].type is user
name: string · optional
Nickname of the user. · Only when collaborators[].type is user
access: string
What this collaborator can do. · One of: edit, view · Only when collaborators[].type is group
id: string
Team group id. · Only when collaborators[].type is group
name: string · optional
Name of the team group. · Only when collaborators[].type is group
access: string
What this collaborator can do. · One of: edit, view · Only when collaborators[].type is team
id: string
Team id: the genially is shared with the whole team. · Only when collaborators[].type is team
▸privacy: object
Who can reach the genially.
visibility: string
draft: Not published yet: only collaborators reach it. · anyoneWithLink: Published and reachable by anyone holding the link. · restricted: Published, but only the listed collaborators reach it.
hasPassword: boolean
Whether opening it requires a password. · Only when privacy.visibility is anyoneWithLink
hiddenInSearchEngines: boolean
Whether search engines are asked not to index it. · Only when privacy.visibility is anyoneWithLink
reusable: boolean
Whether others may reuse it as a template. · Only when privacy.visibility is anyoneWithLink
thumbnailUrl: string · optional
Preview image, when it has one.
viewUrl: string · optional
Public link to the published genially. Omitted while it is a draft.
geniallyId is not a valid id. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
403
The genially exists but falls outside the scope of your token.
404
No genially with that id, or it is in the trash or disabled. The three cases are indistinguishable on purpose.
REST API · Geniallys
Get user-tracking analytics for a genially
Returns per-user session metrics and per-question answers for a genially within the requested date range. Range is required and capped at 60 days. Every viewer with activity in the range is returned; narrow the dates to keep responses small on busy geniallys. A genially in your scope that was never published is not an error: it has no activity, so the response is an empty array.
Dates are not YYYY-MM-DD, endDate is earlier than startDate, or the range exceeds 60 days. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
403
No genially with that id inside the token scope — unknown ids and ids of another team are indistinguishable.
REST API · Geniallys
Get global analytics for a genially
Returns aggregated visit analytics for a genially within the requested date range: total visits, visits per day, visits per slide, and interactions per item. Range is required and capped at 90 days. Requires a user-bound credential that also carries a team: a personal access token, or an authorization-code OAuth token from a confidential client. A genially in your scope that was never published is not an error: it has no visits, so the counters are zero and the breakdowns empty.
Dates are not YYYY-MM-DD, endDate is earlier than startDate, or the range exceeds 90 days. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
403
The token is not user-bound (this endpoint requires one), or no genially with that id exists inside the token scope — unknown ids and ids of another team are indistinguishable.
REST API
Spaces
Every endpoint of this resource — parameters, response shape, examples and errors.
REST API · Spaces
List the spaces of a team
Lists the spaces of a team with cursor pagination. The team is always the one carried by the token — it is never guessed from the user. Team tokens list every space of their team; a user-bound credential (a personal access token, or an authorization-code OAuth token from a confidential client) lists the spaces that user can access within that team.
GET/v1/spacesauth: Bearer token
Query parameters
limit: integer · optional
How many spaces to return in one page. · 1–50 · Defaults to 48
last: string · optional
Pagination cursor: the id of the last space of the previous page. Omit it to get the first page.
limit is out of the 1–50 range, or last is empty. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
REST API · Spaces
List the folders of a team space
Lists the root folders of a team space of the team the token is bound to, or the children of a folder when parentId is given. Supports sortBy/sortDirection. Team tokens list any space of their team; a user-bound credential (a personal access token, or an authorization-code OAuth token from a confidential client) browses as that user.
GET/v1/spaces/{spaceId}/foldersauth: Bearer token
Path parameters
spaceId: string
Id of the team space whose folders you want to list.
Query parameters
parentId: string · optional
Id of a folder: returns its subfolders instead of the root folders of the space.
The spaceId is not a 24-character hex id, sortBy or sortDirection is not one of the accepted values, or parentId is empty. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
403
No space with that id inside the token scope — unknown ids and ids of another team are indistinguishable.
REST API · Spaces
List the geniallys of a team space
Lists the geniallys of a space with cursor pagination. Team tokens list any space of their team; a user-bound credential (a personal access token, or an authorization-code OAuth token from a confidential client) lists the spaces that user can access.
The spaceId is not a 24-character hex id, limit is out of the 1–50 range, or last is empty. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
403
No space with that id inside the token scope — unknown ids and ids of another team are indistinguishable.
REST API
Folders
Every endpoint of this resource — parameters, response shape, examples and errors.
REST API · Folders
List the geniallys of a folder
Lists the geniallys inside a folder of the team the token is bound to. Supports cursor pagination (limit/last). Team tokens list any folder of their team; a user-bound credential (a personal access token, or an authorization-code OAuth token from a confidential client) browses as that user.
The folderId is not a 24-character hex id, limit is out of the 1–50 range, or last is empty. Also returned when the token carries no team (a public-client OAuth token).
401
The token is missing, malformed or expired.
403
No folder with that id inside the token scope — unknown ids and ids of another team are indistinguishable.
REST API
Examples
End-to-end walkthroughs that put the REST API to work: each one goes from registering your integration in Genially to a running app that calls the API.
Example
Connect your users' Genially accounts
When your app acts on behalf of the people who use it, each of them connects their own Genially account instead of pasting a token: they sign in to Genially, come back to your app, and your backend calls the API as them. This tutorial registers an OAuth app for your team and runs a tiny web app that connects an account and lists its geniallys.
What you will build
An OAuth app registered in your team settings, with the URL your app receives the user back on.
A dependency-free web app with a Connect with Genially link that runs the authorization code flow with PKCE.
A page that lists the geniallys the connected user can access, renewing the access token on its own when it expires.
1. Register an OAuth app
In your team settings — app.genially.com/teams/{teamId}/settings/team-oauth-app — create an OAuth app: give it a name and add the redirect URI your app listens on, <your app URL>/callback. Genially only sends users back to a redirect URI registered on the app, compared character by character. While you develop, http://localhost:7272/callback works: the redirect happens in the user’s browser.
Copy the client ID and the client secret shown at creation — the secret is not shown again. The app you run next reads them from GENIALLY_CLIENT_ID and GENIALLY_CLIENT_SECRET. An app created from team settings is a confidential client of your team: every token it obtains acts inside that team.
2. Run the app
Pick your language — each app is a single file on the platform’s standard library, nothing else to install, and all six ship together in oauth-connect-samples.zip. It keeps one connection in memory: enough to follow the flow, while a real app stores one per user.
// app.mjsimport { createServer } from'node:http';
import { createHash, randomBytes } from'node:crypto';
const AUTH = 'https://auth.genially.com/oauth';
const API = 'https://developer-api.genially.com';
const clientId = process.env.GENIALLY_CLIENT_ID;
const clientSecret = process.env.GENIALLY_CLIENT_SECRET;
const publicUrl = process.env.PUBLIC_URL ?? 'http://localhost:7272';
const redirectUri = publicUrl + '/callback';
const connectLink = '<a href="/connect">Connect with Genially</a>';
// One connection kept in memory — store it per user in a real applet pending = null;
let tokens = null;
const random = () => randomBytes(32).toString('base64url');
const escape = text => text.replace(/[&<>"']/g, char => '&#' + char.charCodeAt(0) + ';');
const send = (res, status, html) =>
res.writeHead(status, { 'content-type': 'text/html; charset=utf-8' }).end(html);
const requestTokens = async params => {
const res = await fetch(AUTH + '/token', {
method: 'POST',
headers: {
authorization: 'Basic ' + Buffer.from(clientId + ':' + clientSecret).toString('base64'),
},
body: new URLSearchParams({ ...params, resource: API }),
});
if (!res.ok) {
console.log('Token request failed (' + res.status + '): ' + (await res.text()));
returnfalse;
}
const body = await res.json();
tokens = {
accessToken: body.access_token,
refreshToken: body.refresh_token,
expiresAt: Date.now() + body.expires_in * 1000,
};
returntrue;
};
// Refresh tokens are single-use: always keep the new oneconst refreshIfNeeded = async () => {
if (tokens.expiresAt - Date.now() > 60_000) {
returntrue;
}
const refreshed = await requestTokens({
grant_type: 'refresh_token',
refresh_token: tokens.refreshToken,
});
if (refreshed) {
console.log('🔄 Access token refreshed');
}
return refreshed;
};
const handle = async (req, res) => {
const url = new URL(req.url, publicUrl);
if (url.pathname === '/connect') {
// PKCE: keep the verifier, send only its SHA-256 challenge
pending = { verifier: random(), state: random() };
const challenge = createHash('sha256').update(pending.verifier).digest('base64url');
const query = new URLSearchParams({
response_type: 'code',
client_id: clientId,
redirect_uri: redirectUri,
code_challenge: challenge,
code_challenge_method: 'S256',
state: pending.state,
resource: API,
});
return res.writeHead(302, { location: AUTH + '/authorize?' + query }).end();
}
if (url.pathname === '/callback') {
const error = url.searchParams.get('error');
if (error) {
console.log('Genially did not authorize the connection: ' + error);
return send(res, 400, 'Genially did not authorize the connection: ' + escape(error));
}
// The state ties the callback to the request this app started — reject anything elseif (!pending || url.searchParams.get('state') !== pending.state) {
return send(res, 400, 'State mismatch');
}
// Exchange the code server-side: the client secret never reaches the browserconst connected = await requestTokens({
grant_type: 'authorization_code',
code: url.searchParams.get('code'),
redirect_uri: redirectUri,
code_verifier: pending.verifier,
});
if (!connected) {
return send(res, 502, 'Could not connect to Genially');
}
pending = null;
console.log('✅ Connected to Genially');
return res.writeHead(302, { location: '/' }).end();
}
if (url.pathname !== '/') {
return res.writeHead(404).end();
}
if (!tokens || !(await refreshIfNeeded())) {
tokens = null;
return send(res, 200, connectLink);
}
const api = await fetch(API + '/v1/geniallys/search?limit=20', {
headers: { authorization: 'Bearer ' + tokens.accessToken },
});
// A 401 means the connection is gone — ask the user to connect againif (api.status === 401) {
tokens = null;
return send(res, 200, connectLink);
}
if (!api.ok) {
return send(res, 502, 'Genially API answered ' + api.status);
}
const geniallys = await api.json();
const items = geniallys.map(g => '<li>' + escape(g.name) + '</li>').join('');
send(res, 200, '<h1>Geniallys you can access</h1><ul>' + items + '</ul>');
};
createServer((req, res) =>
handle(req, res).catch(error => {
// A network failure answers 502 and keeps the connection
console.log('Could not reach Genially: ' + (error.cause ?? error).message);
send(res, 502, 'Could not reach Genially');
}),
).listen(7272, () => {
console.log('Open ' + publicUrl + ' to connect your Genially account');
console.log('Redirect URI: ' + redirectUri);
});
# app.pyimport base64
import hashlib
import html
import json
import os
import secrets
import time
import urllib.error
import urllib.parse
import urllib.request
from http.server import BaseHTTPRequestHandler, HTTPServer
AUTH = 'https://auth.genially.com/oauth'
API = 'https://developer-api.genially.com'
CLIENT_ID = os.environ['GENIALLY_CLIENT_ID']
CLIENT_SECRET = os.environ['GENIALLY_CLIENT_SECRET']
PUBLIC_URL = os.environ.get('PUBLIC_URL', 'http://localhost:7272')
REDIRECT_URI = PUBLIC_URL + '/callback'
CONNECT_LINK = '<a href="/connect">Connect with Genially</a>'# One connection kept in memory — store it per user in a real app
pending = None
tokens = Nonedef base64url(data):
return base64.urlsafe_b64encode(data).rstrip(b'=').decode()
def request_tokens(params):
global tokens
basic = base64.b64encode(f'{CLIENT_ID}:{CLIENT_SECRET}'.encode()).decode()
request = urllib.request.Request(
AUTH + '/token',
data=urllib.parse.urlencode({**params, 'resource': API}).encode(),
headers={'Authorization': 'Basic ' + basic},
)
try:
with urllib.request.urlopen(request) as response:
body = json.load(response)
except urllib.error.HTTPError as error:
print(f'Token request failed ({error.code}): {error.read().decode()}', flush=True)
returnFalse
tokens = {
'access_token': body['access_token'],
'refresh_token': body['refresh_token'],
'expires_at': time.time() + body['expires_in'],
}
returnTrue# Refresh tokens are single-use: always keep the new onedef refresh_if_needed():
if tokens['expires_at'] - time.time() > 60:
returnTrue
refreshed = request_tokens({'grant_type': 'refresh_token', 'refresh_token': tokens['refresh_token']})
if refreshed:
print('🔄 Access token refreshed', flush=True)
return refreshed
class App(BaseHTTPRequestHandler):
def do_GET(self):
# A network failure answers 502 and keeps the connectiontry:
self.route()
except urllib.error.URLError as error:
print(f'Could not reach Genially: {error.reason}', flush=True)
self.send(502, 'Could not reach Genially')
def route(self):
global pending, tokens
url = urllib.parse.urlsplit(self.path)
query = dict(urllib.parse.parse_qsl(url.query))
if url.path == '/connect':
# PKCE: keep the verifier, send only its SHA-256 challenge
pending = {'verifier': secrets.token_urlsafe(32), 'state': secrets.token_urlsafe(32)}
challenge = base64url(hashlib.sha256(pending['verifier'].encode()).digest())
return self.redirect(AUTH + '/authorize?' + urllib.parse.urlencode({
'response_type': 'code',
'client_id': CLIENT_ID,
'redirect_uri': REDIRECT_URI,
'code_challenge': challenge,
'code_challenge_method': 'S256',
'state': pending['state'],
'resource': API,
}))
if url.path == '/callback':
if'error'in query:
print('Genially did not authorize the connection: ' + query['error'], flush=True)
return self.send(400, 'Genially did not authorize the connection: ' + html.escape(query['error']))
# The state ties the callback to the request this app started — reject anything elseif pending isNoneor query.get('state') != pending['state']:
return self.send(400, 'State mismatch')
# Exchange the code server-side: the client secret never reaches the browser
connected = request_tokens({
'grant_type': 'authorization_code',
'code': query.get('code', ''),
'redirect_uri': REDIRECT_URI,
'code_verifier': pending['verifier'],
})
if not connected:
return self.send(502, 'Could not connect to Genially')
pending = None
print('✅ Connected to Genially', flush=True)
return self.redirect('/')
if url.path != '/':
return self.send(404, '')
if tokens isNoneor not refresh_if_needed():
tokens = Nonereturn self.send(200, CONNECT_LINK)
request = urllib.request.Request(
API + '/v1/geniallys/search?limit=20',
headers={'Authorization': 'Bearer ' + tokens['access_token']},
)
try:
with urllib.request.urlopen(request) as response:
geniallys = json.load(response)
except urllib.error.HTTPError as error:
# A 401 means the connection is gone — ask the user to connect againif error.code == 401:
tokens = Nonereturn self.send(200, CONNECT_LINK)
return self.send(502, f'Genially API answered {error.code}')
items = ''.join(f'<li>{html.escape(genially["name"])}</li>'for genially in geniallys)
self.send(200, f'<h1>Geniallys you can access</h1><ul>{items}</ul>')
def send(self, status, body):
self.send_response(status)
self.send_header('Content-Type', 'text/html; charset=utf-8')
self.end_headers()
self.wfile.write(body.encode())
def redirect(self, location):
self.send_response(302)
self.send_header('Location', location)
self.end_headers()
def log_message(self, format, *args):
pass
print(f'Open {PUBLIC_URL} to connect your Genially account', flush=True)
print(f'Redirect URI: {REDIRECT_URI}', flush=True)
HTTPServer(('', 7272), App).serve_forever()
<?php// app.php// Requires PHP 8.4+ (http_get_last_response_headers)const AUTH = 'https://auth.genially.com/oauth';
const API = 'https://developer-api.genially.com';
const CONNECT_LINK = '<a href="/connect">Connect with Genially</a>';
$clientId = getenv('GENIALLY_CLIENT_ID');
$publicUrl = getenv('PUBLIC_URL') ?: 'http://localhost:7272';
$redirectUri = $publicUrl . '/callback';
// `php app.php` prints the URLs and serves this same file with PHP's built-in serverif (PHP_SAPI === 'cli') {
echo"Open $publicUrl to connect your Genially account\n";
echo"Redirect URI: $redirectUri\n";
passthru(PHP_BINARY . ' -S 0.0.0.0:7272 ' . escapeshellarg(__FILE__));
exit;
}
function base64url(string $bytes): string
{
return rtrim(strtr(base64_encode($bytes), '+/', '-_'), '=');
}
function http(string $url, array $headers, ?string $form = null): array
{
$body = @file_get_contents($url, false, stream_context_create(['http' => [
'method' => $form === null ? 'GET' : 'POST',
'header' => $headers,
'content' => $form ?? '',
'ignore_errors' => true,
]]));
// A network failure answers 502 and keeps the connectionif ($body === false) {
error_log('Could not reach Genially: ' . error_get_last()['message']);
http_response_code(502);
exit('Could not reach Genially');
}
$status = (int) explode(' ', http_get_last_response_headers()[0])[1];
return [$status, $body];
}
function requestTokens(array $params): bool
{
$basic = base64_encode(getenv('GENIALLY_CLIENT_ID') . ':' . getenv('GENIALLY_CLIENT_SECRET'));
[$status, $body] = http(AUTH . '/token', [
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Basic ' . $basic,
], http_build_query($params + ['resource' => API]));
if ($status !== 200) {
error_log("Token request failed ($status): $body");
returnfalse;
}
$tokens = json_decode($body, true);
$_SESSION['tokens'] = [
'access_token' => $tokens['access_token'],
'refresh_token' => $tokens['refresh_token'],
'expires_at' => time() + $tokens['expires_in'],
];
returntrue;
}
// Refresh tokens are single-use: always keep the new onefunction refreshIfNeeded(): bool
{
if ($_SESSION['tokens']['expires_at'] - time() > 60) {
returntrue;
}
$refreshed = requestTokens([
'grant_type' => 'refresh_token',
'refresh_token' => $_SESSION['tokens']['refresh_token'],
]);
if ($refreshed) {
error_log('🔄 Access token refreshed');
}
return $refreshed;
}
// One connection kept in the PHP session — store it per user in a real app
session_start();
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if ($path === '/connect') {
// PKCE: keep the verifier, send only its SHA-256 challenge
$_SESSION['verifier'] = base64url(random_bytes(32));
$_SESSION['state'] = base64url(random_bytes(32));
header('Location: ' . AUTH . '/authorize?' . http_build_query([
'response_type' => 'code',
'client_id' => $clientId,
'redirect_uri' => $redirectUri,
'code_challenge' => base64url(hash('sha256', $_SESSION['verifier'], true)),
'code_challenge_method' => 'S256',
'state' => $_SESSION['state'],
'resource' => API,
]), true, 302);
exit;
}
if ($path === '/callback') {
if (isset($_GET['error'])) {
error_log('Genially did not authorize the connection: ' . $_GET['error']);
http_response_code(400);
exit('Genially did not authorize the connection: ' . htmlspecialchars($_GET['error']));
}
// The state ties the callback to the request this app started — reject anything elseif (!isset($_SESSION['state'], $_GET['state']) || $_GET['state'] !== $_SESSION['state']) {
http_response_code(400);
exit('State mismatch');
}
// Exchange the code server-side: the client secret never reaches the browser
$connected = requestTokens([
'grant_type' => 'authorization_code',
'code' => $_GET['code'] ?? '',
'redirect_uri' => $redirectUri,
'code_verifier' => $_SESSION['verifier'],
]);
if (!$connected) {
http_response_code(502);
exit('Could not connect to Genially');
}
unset($_SESSION['state'], $_SESSION['verifier']);
error_log('✅ Connected to Genially');
header('Location: /', true, 302);
exit;
}
if ($path !== '/') {
http_response_code(404);
exit;
}
if (!isset($_SESSION['tokens']) || !refreshIfNeeded()) {
unset($_SESSION['tokens']);
exit(CONNECT_LINK);
}
[$status, $body] = http(API . '/v1/geniallys/search?limit=20', [
'Authorization: Bearer ' . $_SESSION['tokens']['access_token'],
]);
// A 401 means the connection is gone — ask the user to connect againif ($status === 401) {
unset($_SESSION['tokens']);
exit(CONNECT_LINK);
}
if ($status !== 200) {
http_response_code(502);
exit("Genially API answered $status");
}
echo'<h1>Geniallys you can access</h1><ul>';
foreach (json_decode($body, true) as $genially) {
echo'<li>' . htmlspecialchars($genially['name']) . '</li>';
}
echo'</ul>';
// App.javaimport static java.nio.charset.StandardCharsets.UTF_8;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpServer;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse.BodyHandlers;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Base64;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class App {
static final String AUTH = "https://auth.genially.com/oauth";
static final String API = "https://developer-api.genially.com";
static final String CLIENT_ID = System.getenv("GENIALLY_CLIENT_ID");
static final String CLIENT_SECRET = System.getenv("GENIALLY_CLIENT_SECRET");
static final String PUBLIC_URL =
Objects.requireNonNullElse(System.getenv("PUBLIC_URL"), "http://localhost:7272");
static final String REDIRECT_URI = PUBLIC_URL + "/callback";
static final String CONNECT_LINK = "<a href=\"/connect\">Connect with Genially</a>";
static final HttpClient HTTP = HttpClient.newHttpClient();
// One connection kept in memory — store it per user in a real appstatic String verifier, state, accessToken, refreshToken;
static long expiresAt;
public static void main(String[] args) throws IOException {
var server = HttpServer.create(new InetSocketAddress(7272), 0);
server.createContext("/", App::handle);
server.start();
System.out.println("Open " + PUBLIC_URL + " to connect your Genially account");
System.out.println("Redirect URI: " + REDIRECT_URI);
}
static void handle(HttpExchange exchange) throws IOException {
try {
route(exchange);
} catch (IOException | InterruptedException error) {
// A network failure answers 502 and keeps the connection
System.out.println("Could not reach Genially: " + error);
send(exchange, 502, "Could not reach Genially");
}
}
static void route(HttpExchange exchange) throws IOException, InterruptedException {
var path = exchange.getRequestURI().getPath();
var query = query(exchange.getRequestURI().getRawQuery());
if (path.equals("/connect")) {
// PKCE: keep the verifier, send only its SHA-256 challenge
verifier = random();
state = random();
redirect(exchange, AUTH + "/authorize?" + form(Map.of(
"response_type", "code",
"client_id", CLIENT_ID,
"redirect_uri", REDIRECT_URI,
"code_challenge", base64url(sha256(verifier)),
"code_challenge_method", "S256",
"state", state,
"resource", API)));
return;
}
if (path.equals("/callback")) {
var error = query.get("error");
if (error != null) {
System.out.println("Genially did not authorize the connection: " + error);
send(exchange, 400, "Genially did not authorize the connection: " + escape(error));
return;
}
// The state ties the callback to the request this app started — reject anything elseif (state == null || !state.equals(query.get("state"))) {
send(exchange, 400, "State mismatch");
return;
}
// Exchange the code server-side: the client secret never reaches the browservar connected = requestTokens(Map.of(
"grant_type", "authorization_code",
"code", query.getOrDefault("code", ""),
"redirect_uri", REDIRECT_URI,
"code_verifier", verifier));
if (!connected) {
send(exchange, 502, "Could not connect to Genially");
return;
}
state = null;
verifier = null;
System.out.println("✅ Connected to Genially");
redirect(exchange, "/");
return;
}
if (!path.equals("/")) {
send(exchange, 404, "");
return;
}
if (accessToken == null || !refreshIfNeeded()) {
accessToken = null;
send(exchange, 200, CONNECT_LINK);
return;
}
var request = HttpRequest.newBuilder(URI.create(API + "/v1/geniallys/search?limit=20"))
.header("Authorization", "Bearer " + accessToken)
.build();
var response = HTTP.send(request, BodyHandlers.ofString());
// A 401 means the connection is gone — ask the user to connect againif (response.statusCode() == 401) {
accessToken = null;
send(exchange, 200, CONNECT_LINK);
return;
}
if (response.statusCode() != 200) {
send(exchange, 502, "Genially API answered " + response.statusCode());
return;
}
var items = jsonStrings(response.body(), "name").stream()
.map(name -> "<li>" + escape(name) + "</li>")
.collect(Collectors.joining());
send(exchange, 200, "<h1>Geniallys you can access</h1><ul>" + items + "</ul>");
}
static boolean requestTokens(Map<String, String> params) throws IOException, InterruptedException {
var body = new HashMap<>(params);
body.put("resource", API);
var basic = Base64.getEncoder().encodeToString((CLIENT_ID + ":" + CLIENT_SECRET).getBytes(UTF_8));
var request = HttpRequest.newBuilder(URI.create(AUTH + "/token"))
.header("Authorization", "Basic " + basic)
.header("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString(form(body)))
.build();
var response = HTTP.send(request, BodyHandlers.ofString());
if (response.statusCode() != 200) {
System.out.println("Token request failed (" + response.statusCode() + "): " + response.body());
returnfalse;
}
accessToken = jsonStrings(response.body(), "access_token").get(0);
refreshToken = jsonStrings(response.body(), "refresh_token").get(0);
expiresAt = System.currentTimeMillis() + jsonNumber(response.body(), "expires_in") * 1000;
returntrue;
}
// Refresh tokens are single-use: always keep the new onestatic boolean refreshIfNeeded() throws IOException, InterruptedException {
if (expiresAt - System.currentTimeMillis() > 60_000) {
returntrue;
}
var refreshed = requestTokens(Map.of(
"grant_type", "refresh_token",
"refresh_token", refreshToken));
if (refreshed) {
System.out.println("🔄 Access token refreshed");
}
return refreshed;
}
// The JDK ships no JSON parser — swap these regexes for your JSON library of choicestatic List<String> jsonStrings(String json, String field) {
return Pattern.compile("\"" + field + "\"\\s*:\\s*\"((?:[^\"\\\\]|\\\\.)*)\"")
.matcher(json)
.results()
.map(match -> Pattern.compile("\\\\(?:u([0-9a-fA-F]{4})|(.))")
.matcher(match.group(1))
.replaceAll(escaped -> Matcher.quoteReplacement(escaped.group(1) != null
? String.valueOf((char) Integer.parseInt(escaped.group(1), 16))
: escaped.group(2))))
.toList();
}
static long jsonNumber(String json, String field) {
var match = Pattern.compile("\"" + field + "\"\\s*:\\s*(\\d+)").matcher(json);
return match.find() ? Long.parseLong(match.group(1)) : 0;
}
static Map<String, String> query(String raw) {
var params = new HashMap<String, String>();
for (var pair : raw == null ? new String[0] : raw.split("&")) {
var parts = pair.split("=", 2);
params.put(URLDecoder.decode(parts[0], UTF_8), parts.length > 1 ? URLDecoder.decode(parts[1], UTF_8) : "");
}
return params;
}
static String form(Map<String, String> params) {
return params.entrySet().stream()
.map(entry -> entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), UTF_8))
.collect(Collectors.joining("&"));
}
static String random() {
var bytes = new byte[32];
new SecureRandom().nextBytes(bytes);
return base64url(bytes);
}
static String base64url(byte[] bytes) {
return Base64.getUrlEncoder().withoutPadding().encodeToString(bytes);
}
static byte[] sha256(String text) {
try {
return MessageDigest.getInstance("SHA-256").digest(text.getBytes(UTF_8));
} catch (NoSuchAlgorithmException error) {
throw new IllegalStateException(error);
}
}
static String escape(String text) {
return text.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """);
}
static void send(HttpExchange exchange, int status, String html) throws IOException {
var bytes = html.getBytes(UTF_8);
exchange.getResponseHeaders().set("Content-Type", "text/html; charset=utf-8");
exchange.sendResponseHeaders(status, bytes.length == 0 ? -1 : bytes.length);
exchange.getResponseBody().write(bytes);
exchange.close();
}
static void redirect(HttpExchange exchange, String location) throws IOException {
exchange.getResponseHeaders().set("Location", location);
exchange.sendResponseHeaders(302, -1);
exchange.close();
}
}
// Program.cs — inside a project created with: dotnet new webusing System.Net;
using System.Net.Http.Headers;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
const string Auth = "https://auth.genially.com/oauth";
const string Api = "https://developer-api.genially.com";
const string ConnectLink = "<a href=\"/connect\">Connect with Genially</a>";
var clientId = Environment.GetEnvironmentVariable("GENIALLY_CLIENT_ID")!;
var clientSecret = Environment.GetEnvironmentVariable("GENIALLY_CLIENT_SECRET")!;
var publicUrl = Environment.GetEnvironmentVariable("PUBLIC_URL") ?? "http://localhost:7272";
var redirectUri = publicUrl + "/callback";
var http = new HttpClient();
var json = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower };
// One connection kept in memory — store it per user in a real appstring? verifier = null, state = null;
TokenResponse? tokens = null;
var expiresAt = DateTimeOffset.MinValue;
var app = WebApplication.CreateBuilder(args).Build();
// A network failure answers 502 and keeps the connection
app.Use(async (context, next) =>
{
try
{
await next();
}
catch (HttpRequestException error)
{
Console.WriteLine("Could not reach Genially: " + error.Message);
await Html(502, "Could not reach Genially").ExecuteAsync(context);
}
});
app.MapGet("/connect", () =>
{
// PKCE: keep the verifier, send only its SHA-256 challenge
verifier = Base64Url(RandomNumberGenerator.GetBytes(32));
state = Base64Url(RandomNumberGenerator.GetBytes(32));
var query = QueryString.Create(new Dictionary<string, string?>
{
["response_type"] = "code",
["client_id"] = clientId,
["redirect_uri"] = redirectUri,
["code_challenge"] = Base64Url(SHA256.HashData(Encoding.UTF8.GetBytes(verifier))),
["code_challenge_method"] = "S256",
["state"] = state,
["resource"] = Api,
});
return Results.Redirect(Auth + "/authorize" + query);
});
app.MapGet("/callback", async (HttpRequest request) =>
{
string? error = request.Query["error"];
if (error is notnull)
{
Console.WriteLine("Genially did not authorize the connection: " + error);
return Html(400, "Genially did not authorize the connection: " + WebUtility.HtmlEncode(error));
}
// The state ties the callback to the request this app started — reject anything elseif (state isnull || request.Query["state"] != state)
{
return Html(400, "State mismatch");
}
// Exchange the code server-side: the client secret never reaches the browservar connected = await RequestTokens(new()
{
["grant_type"] = "authorization_code",
["code"] = request.Query["code"].ToString(),
["redirect_uri"] = redirectUri,
["code_verifier"] = verifier!,
});
if (!connected)
{
return Html(502, "Could not connect to Genially");
}
state = null;
verifier = null;
Console.WriteLine("✅ Connected to Genially");
return Results.Redirect("/");
});
app.MapGet("/", async () =>
{
if (tokens isnull || !await RefreshIfNeeded())
{
tokens = null;
return Html(200, ConnectLink);
}
using var request = new HttpRequestMessage(HttpMethod.Get, Api + "/v1/geniallys/search?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", tokens.AccessToken);
using var response = await http.SendAsync(request);
// A 401 means the connection is gone — ask the user to connect againif (response.StatusCode == HttpStatusCode.Unauthorized)
{
tokens = null;
return Html(200, ConnectLink);
}
if (!response.IsSuccessStatusCode)
{
return Html(502, $"Genially API answered {(int)response.StatusCode}");
}
var geniallys = await response.Content.ReadFromJsonAsync<Genially[]>(json);
var items = string.Concat(geniallys!.Select(genially => "<li>" + WebUtility.HtmlEncode(genially.Name) + "</li>"));
return Html(200, "<h1>Geniallys you can access</h1><ul>" + items + "</ul>");
});
Console.WriteLine($"Open {publicUrl} to connect your Genially account");
Console.WriteLine($"Redirect URI: {redirectUri}");
app.Run("http://*:7272");
async Task<bool> RequestTokens(Dictionary<string, string> form)
{
form["resource"] = Api;
using var request = new HttpRequestMessage(HttpMethod.Post, Auth + "/token")
{
Content = new FormUrlEncodedContent(form),
};
request.Headers.Authorization = new AuthenticationHeaderValue(
"Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes(clientId + ":" + clientSecret)));
using var response = await http.SendAsync(request);
if (!response.IsSuccessStatusCode)
{
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Token request failed ({(int)response.StatusCode}): {body}");
returnfalse;
}
tokens = await response.Content.ReadFromJsonAsync<TokenResponse>(json);
expiresAt = DateTimeOffset.UtcNow.AddSeconds(tokens!.ExpiresIn);
returntrue;
}
// Refresh tokens are single-use: always keep the new oneasync Task<bool> RefreshIfNeeded()
{
if (expiresAt - DateTimeOffset.UtcNow > TimeSpan.FromSeconds(60))
{
returntrue;
}
var refreshed = await RequestTokens(new()
{
["grant_type"] = "refresh_token",
["refresh_token"] = tokens!.RefreshToken,
});
if (refreshed)
{
Console.WriteLine("🔄 Access token refreshed");
}
return refreshed;
}
static string Base64Url(byte[] bytes) =>
Convert.ToBase64String(bytes).TrimEnd('=').Replace('+', '-').Replace('/', '_');
static IResult Html(int status, string body) =>
Results.Content(body, "text/html; charset=utf-8", statusCode: status);
record TokenResponse(string AccessToken, string RefreshToken, int ExpiresIn);
record Genially(string Id, string Name);
// main.gopackage main
import (
"cmp""crypto/rand""crypto/sha256""encoding/base64""encoding/json""fmt""html""io""net/http""net/url""os""strings""time"
)
const (
authURL = "https://auth.genially.com/oauth"
apiURL = "https://developer-api.genially.com"
connectLink = `<a href="/connect">Connect with Genially</a>`
)
var (
clientID = os.Getenv("GENIALLY_CLIENT_ID")
clientSecret = os.Getenv("GENIALLY_CLIENT_SECRET")
publicURL = cmp.Or(os.Getenv("PUBLIC_URL"), "http://localhost:7272")
redirectURI = publicURL + "/callback"
)
type tokenResponse struct {
AccessToken string`json:"access_token"`
RefreshToken string`json:"refresh_token"`
ExpiresIn int`json:"expires_in"`
}
// One connection kept in memory — store it per user in a real appvar (
verifier, state string
tokens *tokenResponse
expiresAt time.Time
)
func random() string {
bytes := make([]byte, 32)
rand.Read(bytes)
return base64.RawURLEncoding.EncodeToString(bytes)
}
func requestTokens(form url.Values) (bool, error) {
form.Set("resource", apiURL)
req, _ := http.NewRequest("POST", authURL+"/token", strings.NewReader(form.Encode()))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
req.SetBasicAuth(clientID, clientSecret)
res, err := http.DefaultClient.Do(req)
if err != nil {
returnfalse, err
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
body, _ := io.ReadAll(res.Body)
fmt.Printf("Token request failed (%d): %s\n", res.StatusCode, body)
returnfalse, nil
}
var next tokenResponse
json.NewDecoder(res.Body).Decode(&next)
tokens = &next
expiresAt = time.Now().Add(time.Duration(next.ExpiresIn) * time.Second)
returntrue, nil
}
// Refresh tokens are single-use: always keep the new onefunc refreshIfNeeded() (bool, error) {
if time.Until(expiresAt) > time.Minute {
returntrue, nil
}
refreshed, err := requestTokens(url.Values{
"grant_type": {"refresh_token"},
"refresh_token": {tokens.RefreshToken},
})
if refreshed {
fmt.Println("🔄 Access token refreshed")
}
return refreshed, err
}
func send(w http.ResponseWriter, status int, body string) {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(status)
io.WriteString(w, body)
}
// A network failure answers 502 and keeps the connectionfunc unreachable(w http.ResponseWriter, err error) {
fmt.Println("Could not reach Genially:", err)
send(w, 502, "Could not reach Genially")
}
func main() {
http.HandleFunc("GET /connect", func(w http.ResponseWriter, r *http.Request) {
// PKCE: keep the verifier, send only its SHA-256 challenge
verifier, state = random(), random()
challenge := sha256.Sum256([]byte(verifier))
query := url.Values{
"response_type": {"code"},
"client_id": {clientID},
"redirect_uri": {redirectURI},
"code_challenge": {base64.RawURLEncoding.EncodeToString(challenge[:])},
"code_challenge_method": {"S256"},
"state": {state},
"resource": {apiURL},
}
http.Redirect(w, r, authURL+"/authorize?"+query.Encode(), http.StatusFound)
})
http.HandleFunc("GET /callback", func(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query()
if query.Has("error") {
fmt.Println("Genially did not authorize the connection: " + query.Get("error"))
send(w, 400, "Genially did not authorize the connection: "+html.EscapeString(query.Get("error")))
return
}
// The state ties the callback to the request this app started — reject anything elseif state == "" || query.Get("state") != state {
send(w, 400, "State mismatch")
return
}
// Exchange the code server-side: the client secret never reaches the browser
connected, err := requestTokens(url.Values{
"grant_type": {"authorization_code"},
"code": {query.Get("code")},
"redirect_uri": {redirectURI},
"code_verifier": {verifier},
})
if err != nil {
unreachable(w, err)
return
}
if !connected {
send(w, 502, "Could not connect to Genially")
return
}
verifier, state = "", ""
fmt.Println("✅ Connected to Genially")
http.Redirect(w, r, "/", http.StatusFound)
})
http.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) {
if tokens == nil {
send(w, 200, connectLink)
return
}
refreshed, err := refreshIfNeeded()
if err != nil {
unreachable(w, err)
return
}
if !refreshed {
tokens = nil
send(w, 200, connectLink)
return
}
req, _ := http.NewRequest("GET", apiURL+"/v1/geniallys/search?limit=20", nil)
req.Header.Set("Authorization", "Bearer "+tokens.AccessToken)
res, err := http.DefaultClient.Do(req)
if err != nil {
unreachable(w, err)
return
}
defer res.Body.Close()
// A 401 means the connection is gone — ask the user to connect againif res.StatusCode == http.StatusUnauthorized {
tokens = nil
send(w, 200, connectLink)
return
}
if res.StatusCode != http.StatusOK {
send(w, 502, fmt.Sprintf("Genially API answered %d", res.StatusCode))
return
}
var geniallys []struct {
Name string`json:"name"`
}
json.NewDecoder(res.Body).Decode(&geniallys)
items := ""for _, genially := range geniallys {
items += "<li>" + html.EscapeString(genially.Name) + "</li>"
}
send(w, 200, "<h1>Geniallys you can access</h1><ul>"+items+"</ul>")
})
fmt.Println("Open " + publicURL + " to connect your Genially account")
fmt.Println("Redirect URI: " + redirectURI)
http.ListenAndServe(":7272", nil)
}
Start it with your credentials. PUBLIC_URL is the address users reach your app on, and the redirect URI is built from it — leave it out to use http://localhost:7272:
Terminal
$ GENIALLY_CLIENT_ID='<your client id>' \
GENIALLY_CLIENT_SECRET='<your client secret>' \
PUBLIC_URL='https://<your public URL>' \
node app.mjs
Open https://<your public URL> to connect your Genially account
Redirect URI: https://<your public URL>/callback
✅ Connected to Genially
$ GENIALLY_CLIENT_ID='<your client id>' \
GENIALLY_CLIENT_SECRET='<your client secret>' \
PUBLIC_URL='https://<your public URL>' \
python3 app.py
Open https://<your public URL> to connect your Genially account
Redirect URI: https://<your public URL>/callback
✅ Connected to Genially
$ GENIALLY_CLIENT_ID='<your client id>' \
GENIALLY_CLIENT_SECRET='<your client secret>' \
PUBLIC_URL='https://<your public URL>' \
php app.php
Open https://<your public URL> to connect your Genially account
Redirect URI: https://<your public URL>/callback
[Tue Oct 20 10:15:00 2026] PHP 8.4.26 Development Server (http://0.0.0.0:7272) started
[Tue Oct 20 10:15:21 2026] ✅ Connected to Genially
$ GENIALLY_CLIENT_ID='<your client id>' \
GENIALLY_CLIENT_SECRET='<your client secret>' \
PUBLIC_URL='https://<your public URL>' \
java App.java
Open https://<your public URL> to connect your Genially account
Redirect URI: https://<your public URL>/callback
✅ Connected to Genially
$ dotnet new web
$ GENIALLY_CLIENT_ID='<your client id>' \
GENIALLY_CLIENT_SECRET='<your client secret>' \
PUBLIC_URL='https://<your public URL>' \
dotnet run
Building...
Open https://<your public URL> to connect your Genially account
Redirect URI: https://<your public URL>/callback
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:7272
✅ Connected to Genially
$ GENIALLY_CLIENT_ID='<your client id>' \
GENIALLY_CLIENT_SECRET='<your client secret>' \
PUBLIC_URL='https://<your public URL>' \
go run main.go
Open https://<your public URL> to connect your Genially account
Redirect URI: https://<your public URL>/callback
✅ Connected to Genially
Prefer a container? Each app ships as a minimal Dockerfile, and the build and run commands are the same whichever language you pick:
Dockerfile
FROM node:24-alpine
WORKDIR /app
COPY app.mjs .
EXPOSE7272CMD ["node", "app.mjs"]
FROM python:3.12-alpine
WORKDIR /app
COPY app.py .
EXPOSE7272CMD ["python", "app.py"]
FROM php:8.4-cli-alpine
WORKDIR /app
COPY app.php .
EXPOSE7272CMD ["php", "app.php"]
FROM eclipse-temurin:21-jdk-alpine
WORKDIR /app
COPY App.java .
EXPOSE7272CMD ["java", "App.java"]
# build context = the dotnet new web project folderFROM mcr.microsoft.com/dotnet/sdk:8.0
WORKDIR /app
COPY . .
EXPOSE7272CMD ["dotnet", "run"]
Open the app and click Connect with Genially. Genially asks the user to sign in if they have no session, then sends them back to your redirect URI, and the page lists their geniallys:
Each route of the app is one step of the flow:
Route
What it does
GET /connect
Creates a PKCE verifier and its S256 challenge plus a random state, keeps both, and redirects to https://auth.genially.com/oauth/authorize with response_type=code, the client ID, the redirect URI, the challenge, the state and resource=https://developer-api.genially.com.
GET /callback
Rejects the request if the state is not the one it kept, then exchanges the code at https://auth.genially.com/oauth/token with grant_type=authorization_code, the redirect URI and the verifier, authenticating with the client ID and secret. The code expires 10 minutes after it is issued and works once.
GET /
Calls GET /v1/geniallys/search with the access token as a bearer credential. When the token is about to expire it first asks for a new one with grant_type=refresh_token.
The code exchange and every refresh run on your server: the client secret and the tokens never reach the browser. PKCE ties the code to the app that started the flow, so an intercepted code is useless on its own.
Who can connect
Tokens of an app created in team settings always act inside that team, so only its members can connect. Anyone else is sent back to your redirect URI with error=access_denied instead of a code — show them a message rather than retrying.
Inside the team, the token acts as the user who connected: GET /v1/geniallys/search returns the geniallys that user can access, not every genially of the team. The token’s sub claim is that user’s id and team_id the team — the full claim list is in Authentication.
Keeping the connection
Token
Lifetime
What to do
Access token
1 hour
Send it on every API call; renew it with the refresh token before it expires.
Refresh token
30 days
Single-use: every refresh returns a new one, which replaces it. Reusing a spent refresh token revokes the whole connection, so never run two refreshes for the same user at once.
To disconnect a user, delete their tokens: there is no endpoint to revoke them, and the last access token keeps working until it expires. Disabling, deleting the OAuth app or rotating its secret affects every connection at once — see Authentication.
A complete example
your-learning-platform.zip is the same flow inside a sample learning platform (Node.js, no dependencies). It adds what a product needs on top of the minimal app:
Its own users, each with their own Genially connection stored on disk, and a Disconnect button.
A My activities tab with the geniallys the user owns: it reads owner.id from GET /v1/geniallys/{geniallyId} and keeps the ones that match the token’s sub.
A Courses tab that groups those activities into demo courses.
One refresh at a time per user, so concurrent requests never reuse a spent refresh token.
Webhooks
Events
Webhooks push events to your endpoint as HTTPS POST requests the moment they happen, so you can react without polling. Every delivery is signed with your webhook secret so you can verify it came from Genially.
Configure a webhook
In your team settings — app.genially.com/teams/{teamId}/settings/webhooks, managed by team owners and admins — create a webhook with a name, your endpoint URL and the events you want to subscribe to. The name is up to 100 characters and only labels the webhook in that screen, so you can tell several apart; you can rename it later, and it never travels in a delivery — neither in the body nor in the headers. The name and the subscribed events stay editable, but the endpoint URL does not: to point a webhook somewhere else, delete it and create a new one. You get a unique signing secret at creation; copy it then, it is not shown again. Each webhook keeps a browsable delivery history for 7 days.
Event types
Event
Triggered when
interactive_question.answered
A viewer answers an interactive question of a published genially.
slide.viewed
A viewer views a slide of a published genially; the payload carries the time spent on it.
lti_session.started
A learner opens a genially through an LTI launch from an LMS.
lti_session.ended
That LTI session ends; the payload carries the total duration.
The delivery request
Each event reaches your endpoint as a JSON POST. The body is an envelope: id (the delivery id), eventId, event, createdAt and the event-specific data.
Identifies the event. Stable across retries and shared by every webhook receiving it — use it as your idempotency key.
x-genially-delivery
Identifies each individual attempt; changes on every retry.
x-genially-signature
HMAC signature of the body: sha256=<hex>.
Fields without a value are omitted from data, never sent as null — parse defensively. This applies to the keys of an object, not to the items of an array: a null inside an array survives, so answerImages can arrive as [null, "https://…"] while an answerImages that has no value at all is absent from answer altogether.
Each event's field list is the whole contract: data is matched against the published shape for its event before the delivery is signed, and anything not declared there is removed rather than forwarded. A field you see in a delivery is a field documented on that event's page. When something upstream goes wrong you may receive fewer fields than documented, never different ones — so guard for a field being absent, but never for a shape you have not seen documented.
Each event carries its own data shape, and slide.viewed and interactive_question.answered each travel in two different shapes depending on where the view happened. The lms block is what tells them apart: it is present when the genially was opened through an LTI launch from an LMS — carrying the user, course and resource-link context the LTI platform supplied — and absent otherwise. Branch on it before reading anything else: the two shapes carry different fields, and they do not share a session identifier.
Every field of every shape, with an example of each, is documented per event:
Expose an HTTPS POST endpoint for Genially to call. The signature is the HMAC-SHA256 of the raw request body — exactly as received, before any JSON parsing — keyed with your webhook secret and hex-encoded; if your framework parses the body first, make the route hand you the raw bytes (in Express, express.raw({ type: 'application/json' })). Compute it, compare with the x-genially-signature header, and acknowledge before doing any heavy work:
import { createServer } from'node:http';
import { createHmac, timingSafeEqual } from'node:crypto';
const secret = process.env.GENIALLY_WEBHOOK_SECRET;
createServer((req, res) => {
if (req.method !== 'POST' || req.url !== '/webhooks') {
return res.writeHead(404).end();
}
const chunks = [];
req.on('data', chunk => chunks.push(chunk));
req.on('end', () => {
const raw = Buffer.concat(chunks);
// The signature covers the raw bytes — verify before parsing, in constant timeconst expected =
'sha256=' + createHmac('sha256', secret).update(raw).digest('hex');
const received = req.headers['x-genially-signature'] ?? '';
if (
received.length !== expected.length ||
!timingSafeEqual(Buffer.from(expected), Buffer.from(received))
) {
console.log('⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET');
return res.writeHead(401).end();
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retrylet body;
try {
body = JSON.parse(raw);
} catch {
return res.writeHead(400).end();
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
res.writeHead(204).end();
// Process after responding; dedupe on eventId (retries share it)
console.log(body.event, body.eventId, body.data);
});
}).listen(3000);
import hashlib
import hmac
import json
import os
from http.server import BaseHTTPRequestHandler, HTTPServer
SECRET = os.environ['GENIALLY_WEBHOOK_SECRET'].encode()
class Receiver(BaseHTTPRequestHandler):
def do_POST(self):
if self.path != '/webhooks':
self.send_response(404)
self.end_headers()
return
raw = self.rfile.read(int(self.headers['content-length']))
# The signature covers the raw bytes — verify before parsing
expected = 'sha256=' + hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
ifnot hmac.compare_digest(expected, self.headers.get('x-genially-signature', '')):
print('⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET', flush=True)
self.send_response(401)
self.end_headers()
return# Reject malformed bodies before acknowledging — a 4xx makes Genially retrytry:
body = json.loads(raw)
except ValueError:
self.send_response(400)
self.end_headers()
return# Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
self.send_response(204)
self.end_headers()
# Process after responding; dedupe on eventId (retries share it)
print(body['event'], body['eventId'], body['data'], flush=True)
HTTPServer(('', 3000), Receiver).serve_forever()
<?php
$secret = getenv('GENIALLY_WEBHOOK_SECRET');
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || $_SERVER['REQUEST_URI'] !== '/webhooks') {
http_response_code(404);
exit;
}
$raw = file_get_contents('php://input');
// The signature covers the raw bytes — verify before parsing
$expected = 'sha256=' . hash_hmac('sha256', $raw, $secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_GENIALLY_SIGNATURE'] ?? '')) {
error_log('⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET');
http_response_code(401);
exit;
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retry
$body = json_decode($raw, true);
if (!is_array($body)) {
http_response_code(400);
exit;
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
http_response_code(204);
// Process after responding; dedupe on eventId (retries share it)
error_log("{$body['event']} {$body['eventId']}");
import com.sun.net.httpserver.HttpServer;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HexFormat;
public class Receiver {
public static void main(String[] args) throws Exception {
var secret = System.getenv("GENIALLY_WEBHOOK_SECRET");
var server = HttpServer.create(new InetSocketAddress(3000), 0);
server.createContext("/webhooks", exchange -> {
if (!"POST".equals(exchange.getRequestMethod())) {
exchange.sendResponseHeaders(404, -1);
exchange.close();
return;
}
var raw = exchange.getRequestBody().readAllBytes();
// The signature covers the raw bytes — verify before parsing
String expected;
try {
var mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
expected = "sha256=" + HexFormat.of().formatHex(mac.doFinal(raw));
} catch (Exception error) {
throw new IllegalStateException(error);
}
var signature = exchange.getRequestHeaders().getFirst("x-genially-signature");
if (
signature == null ||
!MessageDigest.isEqual(
expected.getBytes(StandardCharsets.UTF_8),
signature.getBytes(StandardCharsets.UTF_8))
) {
System.out.println("⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET");
exchange.sendResponseHeaders(401, -1);
exchange.close();
return;
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
exchange.sendResponseHeaders(204, -1);
exchange.close();
// Process after responding; dedupe on eventId (retries share it)
System.out.println(new String(raw, StandardCharsets.UTF_8));
});
server.start();
}
}
// Program.cs — inside a project created with: dotnet new webusing System.Security.Cryptography;
using System.Text;
using System.Text.Json;
var secret = Environment.GetEnvironmentVariable("GENIALLY_WEBHOOK_SECRET")!;
var app = WebApplication.CreateBuilder(args).Build();
app.MapPost("/webhooks", async (HttpRequest request) =>
{
using var memory = new MemoryStream();
await request.Body.CopyToAsync(memory);
var raw = memory.ToArray();
// The signature covers the raw bytes — verify before parsingusing var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secret));
var expected = "sha256=" + Convert.ToHexString(hmac.ComputeHash(raw)).ToLowerInvariant();
var signature = request.Headers["x-genially-signature"].ToString();
if (!CryptographicOperations.FixedTimeEquals(
Encoding.UTF8.GetBytes(expected), Encoding.UTF8.GetBytes(signature)))
{
Console.WriteLine("⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET");
return Results.Unauthorized();
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retry
JsonElement body;
try
{
body = JsonDocument.Parse(raw).RootElement;
}
catch (JsonException)
{
return Results.BadRequest();
}
// Process after acknowledging; dedupe on eventId (retries share it)
Console.WriteLine(body.GetProperty("event") + " " + body.GetProperty("eventId"));
// Any status below 400 within 5 seconds counts as delivered — in production, persist or enqueue before returningreturn Results.NoContent();
});
app.Run("http://*:3000");
package main
import (
"crypto/hmac""crypto/sha256""encoding/hex""encoding/json""fmt""io""net/http""os"
)
var secret = os.Getenv("GENIALLY_WEBHOOK_SECRET")
type envelope struct {
Event string`json:"event"`
EventID string`json:"eventId"`
Data json.RawMessage `json:"data"`
}
func main() {
http.HandleFunc("POST /webhooks", func(w http.ResponseWriter, r *http.Request) {
raw, _ := io.ReadAll(r.Body)
// The signature covers the raw bytes — verify before parsing
mac := hmac.New(sha256.New, []byte(secret))
mac.Write(raw)
expected := "sha256=" + hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(expected), []byte(r.Header.Get("x-genially-signature"))) {
fmt.Println("⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET")
w.WriteHeader(401)
return
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retryvar body envelope
if err := json.Unmarshal(raw, &body); err != nil {
w.WriteHeader(400)
return
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
w.WriteHeader(204)
// Process after responding; dedupe on eventId (retries share it)
fmt.Println(body.Event, body.EventID)
})
http.ListenAndServe(":3000", nil)
}
Each receiver is a single file on the platform’s standard library — the six of them ship together with their Dockerfiles in webhook-receivers-samples.zip. Prefer a container? The build and run commands are the same whichever language you pick:
Dockerfile
FROM node:24-alpine
WORKDIR /app
COPY receiver.mjs .
EXPOSE3000CMD ["node", "receiver.mjs"]
FROM python:3.12-alpine
WORKDIR /app
COPY receiver.py .
EXPOSE3000CMD ["python", "receiver.py"]
Respond within 5 seconds; any status below 400 counts as delivered. On failure — 4xx, 5xx, timeout or connection error — the delivery is retried up to 3 more times, roughly 5 minutes, 30 minutes and 3 hours after the previous attempt, resending the identical body and signature. After the final failed attempt the event is dropped for that webhook.
Webhooks · Event payload
slide.viewed
A viewer views a slide of a published genially; the payload carries the time spent on it.
From a published genially
The default shape, sent for any regular view of the published genially.
geniallyId: string
Id of the genially being viewed
slideId: string
Id of the slide the reported time belongs to
correlationId: string
Identifies one continuous visit to a slide — its deliveries share it, so sum their timeSpentMs for the visit total
slideIndex: number · optional
1-based position of the slide in the published genially · Omitted when there is no value
totalSlides: number · optional
Number of slides in the published genially · Omitted when there is no value
enteredAt: string
When the reported viewing segment started (ISO 8601, viewer clock)
timeSpentMs: number
Milliseconds viewed since the previous delivery of this visit — a delta, not a running total
userSessionId: string
Identifies the viewing session — the same value across every event of one viewer on this genially
userAlias: string · optional
Who viewed — an anonymous code, a self-reported name, or the Genially account name, depending on the audience setup · Omitted when there is no value
geniallyUserId: string · optional
Genially account id of the viewer — present when the genially identifies its audience with a Genially account · Omitted when there is no value
A viewer answers an interactive question of a published genially.
From a published genially
The default shape, sent for any regular view of the published genially.
geniallyId: string
Id of the genially the question belongs to
interactiveQuestionId: string
Id of the answered question element (the widget element id for widget answers)
interactiveQuestionType: string · optional
One of: quiz, openAnswer, trueFalse, image, sort, survey, fillInTheBlanks, shortAnswer, imageSurvey, branchingScenario, widget · Omitted when there is no value
interactiveQuestionAnswerId: string
Id of this answer attempt — re-answering the same question produces a new one
isCorrect: boolean · optional
Whether the answer is correct — only quiz, trueFalse, image, sort and widget answers carry it · Omitted when there is no value
questionText: string · optional
The question's text, with its formatting markup stripped · Omitted when there is no value
▸answer: object
The viewer's answer — which fields it carries depends on the question type
answerIds: array of string · optional
Ids of the selected options, in submission order · Omitted when there is no value
answerTexts: array of string · optional
Display text of each selected option, aligned with answerIds, markup stripped · Omitted when there is no value
answerImages: array of string · optional
Image URL per selected option, aligned with answerIds — present only when the question has image options · Omitted when there is no value
answerText: string · optional
The free text the viewer typed (open answer and short answer) · Omitted when there is no value
blanks: object · optional
Fill-in-the-blanks map: blank id → selected option id · Omitted when there is no value
blankTexts: object · optional
The same map with the selected option text as value · Omitted when there is no value
▸widget: object · optional
The widget's own answer — only widget answers carry it
isCorrect: boolean · optional
Whether the widget reported the answer as correct
answerText: string · optional
The widget's own answer text
▸score: object · optional
value: number · optional
Score the widget assigned to the answer
max: number · optional
Maximum score the widget could assign
▸detail: object · optional
type: string · optional
string: a single text value · stringList: a list of text values
value: string · optional
Extra detail the widget attached to the answer · Only when answer.widget.detail.type is string
value: array of string · optional
Extra detail the widget attached to the answer · Only when answer.widget.detail.type is stringList
userSessionId: string
Identifies the viewing session — the same value across every answer of one respondent
userAlias: string · optional
Who answered — an anonymous code, a self-reported name, or the Genially account name, depending on the audience setup · Omitted when there is no value
geniallyUserId: string · optional
Genially account id of the viewer — present when the genially identifies its audience with a Genially account · Omitted when there is no value
Sent instead when the genially is opened from an LMS through an LTI launch — the payload adds the lms block with the context the platform supplied.
geniallyId: string
Id of the genially the question belongs to
geniallyTitle: string · optional
Title of the genially · Omitted when there is no value
interactiveQuestionId: string
Id of the answered question
questionIndex: number · optional
1-based position of the question among the genially's scoring questions · Omitted when there is no value
totalQuestions: number · optional
Number of scoring questions in the genially · Omitted when there is no value
slideIndex: number · optional
1-based position of the slide the learner was on when answering · Omitted when there is no value
totalSlides: number · optional
Number of visible slides in the genially · Omitted when there is no value
type: number
Numeric question type: 1 quiz, 2 open answer, 3 true/false, 4 image, 5 sort, 6 survey, 7 fill in the blanks, 8 short answer, 9 image survey, 10 branching scenario, 11 widget. A question drawn from a random bank carries the drawn question type
isCorrect: boolean · optional
Whether the answer was correct — only graded question types carry it · Omitted when there is no value
questionText: string · optional
The question's text, with its formatting markup stripped · Omitted when there is no value
▸answer: object
The viewer's answer — which fields it carries depends on the question type
answerIds: array of string · optional
Ids of the selected options, in submission order · Omitted when there is no value
answerTexts: array of string · optional
Display text of each selected option, aligned with answerIds, markup stripped · Omitted when there is no value
answerImages: array of string · optional
Image URL per selected option, aligned with answerIds — present only when the question has image options · Omitted when there is no value
answerText: string · optional
The free text the viewer typed (open answer and short answer) · Omitted when there is no value
blanks: object · optional
Fill-in-the-blanks map: blank id → selected option id · Omitted when there is no value
blankTexts: object · optional
The same map with the selected option text as value · Omitted when there is no value
▸widget: object · optional
The widget's own answer — only widget answers carry it
isCorrect: boolean · optional
Whether the widget reported the answer as correct
answerText: string · optional
The widget's own answer text
▸score: object · optional
value: number · optional
Score the widget assigned to the answer
max: number · optional
Maximum score the widget could assign
▸detail: object · optional
type: string · optional
string: a single text value · stringList: a list of text values
value: string · optional
Extra detail the widget attached to the answer · Only when answer.widget.detail.type is string
value: array of string · optional
Extra detail the widget attached to the answer · Only when answer.widget.detail.type is stringList
▸lms: object
The LMS context the platform supplied at the launch — the same shape on every LTI event
▸user: object
The learner as the LMS identifies them
id: string
The learner's opaque user id on the LMS — the LTI sub claim
email: string · optional
The learner's email, when the LMS releases it · Omitted when there is no value
name: string · optional
The learner's full name, when the LMS releases it · Omitted when there is no value
givenName: string · optional
The learner's given name, when the LMS releases it · Omitted when there is no value
familyName: string · optional
The learner's family name, when the LMS releases it · Omitted when there is no value
▸context: object
The course, placement and session context of the launch
platformIssuer: string
The LMS platform issuer URL — the iss claim of the launch
clientId: string · optional
The OAuth client id of the tool registration the launch came from · Omitted when there is no value
deploymentId: string · optional
The LTI deployment_id claim of the launch · Omitted when there is no value
courseId: string · optional
Id of the LMS course (LTI context claim) · Omitted when there is no value
courseLabel: string · optional
Short label of the LMS course (LTI context claim) · Omitted when there is no value
courseTitle: string · optional
Title of the LMS course (LTI context claim) · Omitted when there is no value
resourceLinkId: string · optional
Id of the LMS placement the learner opened (LTI resource_link claim) · Omitted when there is no value
resourceLinkTitle: string · optional
Title of that LMS placement (LTI resource_link claim) · Omitted when there is no value
roles: array of string
The learner's LTI roles, as the IMS role URIs the platform sent
attempt: number · optional
How many times this learner has launched this genially from the same placement · Omitted when there is no value
sessionId: string
Identifies the LTI session — the same value across every event of one launch
sessionCreatedAt: string
When the LTI session started (ISO 8601) — the moment of the launch
▸endpoint: object · optional
The LTI AGS endpoints the platform granted at the launch
lineitem: string · optional
URL of the placement's grade line item (LTI AGS endpoint claim) · Omitted when there is no value
lineitems: string · optional
URL of the course's line-items collection (LTI AGS endpoint claim) · Omitted when there is no value
End-to-end walkthroughs that put webhooks to work: each one goes from a genially in the editor to a running backend that reacts to deliveries.
Example
Collect form responses
Interactive questions turn a genially into a native form: viewers answer inside the genially itself, and webhooks push each answer to your backend the moment it is sent — no embedded form tool, no polling. This tutorial builds a two-question feedback form and a tiny Node app that prints every response.
What you will build
A one-slide genially with a survey (pick one of three options) and an open response (free text).
A team webhook subscribed to interactive_question.answered.
A dependency-free Node collector that verifies each delivery and prints the answer to the console.
1. Build the form in Genially
In the editor, open the Interactive questions panel. The Information gathering group holds the form-style questions: add a Survey, then write the question and its options in the Content tab. This tutorial uses a workshop feedback form:
Question
Type
Which format do you prefer for the next session? — Interactive video / Gamified quiz / Guided presentation
Survey
What topic would you like us to cover?
Open response
Add an Open response question to the same slide for the free-text field. The selected survey options travel as an array (answer.answerTexts), so the same delivery shape also covers the Allow multiple selection toggle.
The first time, the Content tab offers to activate the activity (“Want to see the responses?”) — press Activate so answers are collected. Then publish your genially: answers flow from the published view.
2. Create the webhook
In your team settings — app.genially.com/teams/{teamId}/settings/webhooks, managed by team owners and admins — press Create webhook: give it a name, set the URL your app will listen on — a public HTTPS URL ending in /webhooks/genially; while you develop, an HTTPS tunnel forwarding to your local port works — and subscribe it to interactive_question.answered only. Copy the signing secret shown at creation — it is not shown again: the collector you build next reads it from GENIALLY_WEBHOOK_SECRET.
3. Run the collector
Pick your language — each collector is a single file on the platform’s standard library, nothing else to install, and all six ship together with their Dockerfiles in form-collectors-samples.zip. It verifies the x-genially-signature header against the raw body, acknowledges, and prints who answered what:
// collector.mjsimport { createServer } from'node:http';
import { createHmac, timingSafeEqual } from'node:crypto';
const secret = process.env.GENIALLY_WEBHOOK_SECRET;
const printAnswer = data => {
const name = data.userAlias ?? data.userSessionId;
const who = data.geniallyUserId
? name + ' (' + data.geniallyUserId + ')'
: name;
const answer =
data.answer.answerTexts?.join(', ') ?? data.answer.answerText ?? '(empty)';
console.log('📩 ' + who + ' · ' + data.questionText);
console.log(' → ' + answer);
};
createServer((req, res) => {
if (req.method !== 'POST' || req.url !== '/webhooks/genially') {
return res.writeHead(404).end();
}
const chunks = [];
req.on('data', chunk => chunks.push(chunk));
req.on('end', () => {
const raw = Buffer.concat(chunks);
// The signature covers the raw bytes — verify before parsing, in constant timeconst expected =
'sha256=' + createHmac('sha256', secret).update(raw).digest('hex');
const received = req.headers['x-genially-signature'] ?? '';
if (
received.length !== expected.length ||
!timingSafeEqual(Buffer.from(expected), Buffer.from(received))
) {
console.log('⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET');
return res.writeHead(401).end();
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retrylet body;
try {
body = JSON.parse(raw);
} catch {
return res.writeHead(400).end();
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
res.writeHead(204).end();
if (body.event === 'interactive_question.answered') {
printAnswer(body.data);
}
});
}).listen(7171, () => console.log('Waiting for form responses on :7171'));
# collector.pyimport hashlib
import hmac
import json
import os
from http.server import BaseHTTPRequestHandler, HTTPServer
SECRET = os.environ['GENIALLY_WEBHOOK_SECRET'].encode()
def print_answer(data):
name = data.get('userAlias') or data.get('userSessionId')
user_id = data.get('geniallyUserId')
who = f'{name} ({user_id})'if user_id else name
answer = data.get('answer', {})
text = ', '.join(answer.get('answerTexts') or []) or answer.get('answerText') or'(empty)'
print(f'📩 {who} · {data.get("questionText")}', flush=True)
print(f' → {text}', flush=True)
class Collector(BaseHTTPRequestHandler):
def do_POST(self):
if self.path != '/webhooks/genially':
self.send_response(404)
self.end_headers()
return
raw = self.rfile.read(int(self.headers['content-length']))
# The signature covers the raw bytes — verify before parsing
expected = 'sha256=' + hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
ifnot hmac.compare_digest(expected, self.headers.get('x-genially-signature', '')):
print('⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET', flush=True)
self.send_response(401)
self.end_headers()
return# Reject malformed bodies before acknowledging — a 4xx makes Genially retrytry:
body = json.loads(raw)
except ValueError:
self.send_response(400)
self.end_headers()
return# Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
self.send_response(204)
self.end_headers()
if body['event'] == 'interactive_question.answered':
print_answer(body['data'])
def log_message(self, format, *args):
pass
print('Waiting for form responses on :7171', flush=True)
HTTPServer(('', 7171), Collector).serve_forever()
<?php// collector.php
$secret = getenv('GENIALLY_WEBHOOK_SECRET');
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || $_SERVER['REQUEST_URI'] !== '/webhooks/genially') {
http_response_code(404);
exit;
}
$raw = file_get_contents('php://input');
// The signature covers the raw bytes — verify before parsing
$expected = 'sha256=' . hash_hmac('sha256', $raw, $secret);
if (!hash_equals($expected, $_SERVER['HTTP_X_GENIALLY_SIGNATURE'] ?? '')) {
error_log('⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET');
http_response_code(401);
exit;
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retry
$body = json_decode($raw, true);
if (!is_array($body)) {
http_response_code(400);
exit;
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
http_response_code(204);
if ($body['event'] !== 'interactive_question.answered') {
exit;
}
$data = $body['data'];
$name = $data['userAlias'] ?? $data['userSessionId'];
$who = isset($data['geniallyUserId']) ? "$name ({$data['geniallyUserId']})" : $name;
$texts = $data['answer']['answerTexts'] ?? null;
$text = $texts ? implode(', ', $texts) : ($data['answer']['answerText'] ?? '(empty)');
error_log("📩 $who · {$data['questionText']}");
error_log(" → $text");
// Collector.javaimport com.sun.net.httpserver.HttpServer;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HexFormat;
public class Collector {
public static void main(String[] args) throws Exception {
var secret = System.getenv("GENIALLY_WEBHOOK_SECRET");
var server = HttpServer.create(new InetSocketAddress(7171), 0);
server.createContext("/webhooks/genially", exchange -> {
if (!"POST".equals(exchange.getRequestMethod())) {
exchange.sendResponseHeaders(404, -1);
exchange.close();
return;
}
var raw = exchange.getRequestBody().readAllBytes();
// The signature covers the raw bytes — verify before parsing
String expected;
try {
var mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
expected = "sha256=" + HexFormat.of().formatHex(mac.doFinal(raw));
} catch (Exception error) {
throw new IllegalStateException(error);
}
var signature = exchange.getRequestHeaders().getFirst("x-genially-signature");
if (
signature == null ||
!MessageDigest.isEqual(
expected.getBytes(StandardCharsets.UTF_8),
signature.getBytes(StandardCharsets.UTF_8))
) {
System.out.println("⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET");
exchange.sendResponseHeaders(401, -1);
exchange.close();
return;
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
exchange.sendResponseHeaders(204, -1);
exchange.close();
// The JDK ships no JSON parser — swap the println for your JSON library of choice
System.out.println("📩 " + new String(raw, StandardCharsets.UTF_8));
});
server.start();
System.out.println("Waiting for form responses on :7171");
}
}
// Program.cs — inside a project created with: dotnet new webusing System.Security.Cryptography;
using System.Text;
using System.Text.Json;
var secret = Environment.GetEnvironmentVariable("GENIALLY_WEBHOOK_SECRET")!;
var app = WebApplication.CreateBuilder(args).Build();
app.MapPost("/webhooks/genially", async (HttpRequest request) =>
{
using var memory = new MemoryStream();
await request.Body.CopyToAsync(memory);
var raw = memory.ToArray();
// The signature covers the raw bytes — verify before parsingusing var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secret));
var expected = "sha256=" + Convert.ToHexString(hmac.ComputeHash(raw)).ToLowerInvariant();
var signature = request.Headers["x-genially-signature"].ToString();
if (!CryptographicOperations.FixedTimeEquals(
Encoding.UTF8.GetBytes(expected), Encoding.UTF8.GetBytes(signature)))
{
Console.WriteLine("⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET");
return Results.Unauthorized();
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retry
JsonElement body;
try
{
body = JsonDocument.Parse(raw).RootElement;
}
catch (JsonException)
{
return Results.BadRequest();
}
if (body.GetProperty("event").GetString() == "interactive_question.answered")
{
PrintAnswer(body.GetProperty("data"));
}
// Any status below 400 within 5 seconds counts as delivered — in production, persist or enqueue before returningreturn Results.NoContent();
});
app.Run("http://*:7171");
static void PrintAnswer(JsonElement data)
{
var name = data.TryGetProperty("userAlias", out var alias)
? alias.GetString()
: data.GetProperty("userSessionId").GetString();
var who = data.TryGetProperty("geniallyUserId", out var userId)
? name + " (" + userId.GetString() + ")"
: name;
var question = data.TryGetProperty("questionText", out var q) ? q.GetString() : null;
var answer = data.GetProperty("answer");
string? text = null;
if (answer.TryGetProperty("answerTexts", out var texts))
{
text = string.Join(", ", texts.EnumerateArray().Select(t => t.GetString()));
}
else if (answer.TryGetProperty("answerText", out var free))
{
text = free.GetString();
}
Console.WriteLine("📩 " + who + " · " + question);
Console.WriteLine(" → " + (text ?? "(empty)"));
}
// collector.gopackage main
import (
"crypto/hmac""crypto/sha256""encoding/hex""encoding/json""fmt""io""net/http""os""strings"
)
var secret = os.Getenv("GENIALLY_WEBHOOK_SECRET")
type delivery struct {
Event string`json:"event"`
Data json.RawMessage `json:"data"`
}
type answerData struct {
QuestionText string`json:"questionText"`
UserAlias string`json:"userAlias"`
UserSessionID string`json:"userSessionId"`
GeniallyUserID string`json:"geniallyUserId"`
Answer struct {
AnswerTexts []string`json:"answerTexts"`
AnswerText string`json:"answerText"`
} `json:"answer"`
}
func printAnswer(rawData json.RawMessage) {
var data answerData
json.Unmarshal(rawData, &data)
name := data.UserAlias
if name == "" {
name = data.UserSessionID
}
who := name
if data.GeniallyUserID != "" {
who = name + " (" + data.GeniallyUserID + ")"
}
text := strings.Join(data.Answer.AnswerTexts, ", ")
if text == "" {
text = data.Answer.AnswerText
}
if text == "" {
text = "(empty)"
}
fmt.Println("📩 " + who + " · " + data.QuestionText)
fmt.Println(" → " + text)
}
func main() {
http.HandleFunc("POST /webhooks/genially", func(w http.ResponseWriter, r *http.Request) {
raw, _ := io.ReadAll(r.Body)
// The signature covers the raw bytes — verify before parsing
mac := hmac.New(sha256.New, []byte(secret))
mac.Write(raw)
expected := "sha256=" + hex.EncodeToString(mac.Sum(nil))
if !hmac.Equal([]byte(expected), []byte(r.Header.Get("x-genially-signature"))) {
fmt.Println("⚠️ Signature mismatch — check GENIALLY_WEBHOOK_SECRET")
w.WriteHeader(401)
return
}
// Reject malformed bodies before acknowledging — a 4xx makes Genially retryvar body delivery
if err := json.Unmarshal(raw, &body); err != nil {
w.WriteHeader(400)
return
}
// Acknowledge fast — in production, persist or enqueue the event before this line; any status below 400 within 5 seconds counts as delivered
w.WriteHeader(204)
if body.Event != "interactive_question.answered" {
return
}
printAnswer(body.Data)
})
fmt.Println("Waiting for form responses on :7171")
http.ListenAndServe(":7171", nil)
}
The collector listens at http://localhost:7171/webhooks/genially — the path the webhook URL from step 2 forwards to. A delivery that fails verification is rejected with a 401 and logged as a signature mismatch — if you see it, the GENIALLY_WEBHOOK_SECRET the collector was started with is not this webhook’s signing secret.
Prefer a container? Each collector ships as a minimal Dockerfile, and the build and run commands are the same whichever language you pick:
Dockerfile
FROM node:24-alpine
WORKDIR /app
COPY collector.mjs .
EXPOSE7171CMD ["node", "collector.mjs"]
FROM python:3.12-alpine
WORKDIR /app
COPY collector.py .
EXPOSE7171CMD ["python", "collector.py"]
Open the published genially as a viewer, pick an option and send the free-text answer. Each answered question produces its own delivery, and the collector prints them as they arrive:
Terminal
$ GENIALLY_WEBHOOK_SECRET='<your signing secret>' node collector.mjs
Waiting for form responses on :7171
📩 maria · Which format do you prefer for the next session?
→ Gamified quiz
📩 maria · What topic would you like us to cover?
→ How to embed third-party content
$ GENIALLY_WEBHOOK_SECRET='<your signing secret>' python3 collector.py
Waiting for form responses on :7171
📩 maria · Which format do you prefer for the next session?
→ Gamified quiz
📩 maria · What topic would you like us to cover?
→ How to embed third-party content
$ GENIALLY_WEBHOOK_SECRET='<your signing secret>' php -S 0.0.0.0:7171 collector.php
[Tue Aug 25 10:15:00 2026] PHP 8.3.33 Development Server (http://0.0.0.0:7171) started
[Tue Aug 25 10:15:12 2026] 📩 maria · Which format do you prefer for the next session?
[Tue Aug 25 10:15:12 2026] → Gamified quiz
[Tue Aug 25 10:15:14 2026] 📩 maria · What topic would you like us to cover?
[Tue Aug 25 10:15:14 2026] → How to embed third-party content
$ GENIALLY_WEBHOOK_SECRET='<your signing secret>' java Collector.java
Waiting for form responses on :7171
📩 {"id":"3d5f0b3a-…","event":"interactive_question.answered","data":{"questionText":"Which format do you prefer for the next session?","answer":{"answerTexts":["Gamified quiz"]},"userAlias":"maria",…}}
📩 {"id":"7e2a1c9b-…","event":"interactive_question.answered","data":{"questionText":"What topic would you like us to cover?","answer":{"answerText":"How to embed third-party content"},"userAlias":"maria",…}}
$ dotnet new web
$ GENIALLY_WEBHOOK_SECRET='<your signing secret>' dotnet run
Building...
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://[::]:7171
📩 maria · Which format do you prefer for the next session?
→ Gamified quiz
📩 maria · What topic would you like us to cover?
→ How to embed third-party content
$ GENIALLY_WEBHOOK_SECRET='<your signing secret>' go run collector.go
Waiting for form responses on :7171
📩 maria · Which format do you prefer for the next session?
→ Gamified quiz
📩 maria · What topic would you like us to cover?
→ How to embed third-party content
What arrives
The survey answer is delivered with the selected option ids and their labels already resolved:
Survey answer — delivery body
{
"id": "3d5f0b3a-4b6e-4f9a-9c2d-6f1f2a7b8c90",
"eventId": "c9c1d4a7f34b0e12",
"event": "interactive_question.answered",
"createdAt": "2026-08-25T10:15:00.000Z",
"data": {
"geniallyId": "64f1c2a0d2b4a90012f3e777",
"interactiveQuestionId": "ques-01",
"interactiveQuestionType": "survey",
"interactiveQuestionAnswerId": "answ-01",
"questionText": "Which format do you prefer for the next session?",
"answer": {
"answerIds": ["opt-2"],
"answerTexts": ["Gamified quiz"]
},
"userSessionId": "f0a1b2c3-d4e5-4f60-8a9b-0c1d2e3f4a5b",
"userAlias": "maria"
}
}
The open response carries the free text in answer.answerText instead (only the data block shown):
Open response answer — data
{
"geniallyId": "64f1c2a0d2b4a90012f3e777",
"interactiveQuestionId": "ques-02",
"interactiveQuestionType": "openAnswer",
"interactiveQuestionAnswerId": "answ-02",
"questionText": "What topic would you like us to cover?",
"answer": {
"answerText": "How to embed third-party content"
},
"userSessionId": "f0a1b2c3-d4e5-4f60-8a9b-0c1d2e3f4a5b",
"userAlias": "maria"
}
Surveys deliver the selected labels resolved in answer.answerTexts — one entry per selection — while open responses carry the free text in answer.answerText. userSessionId is the same across every answer of one respondent, so it stitches both answers into one submission. The full field list — types, and when each field is omitted — lives on the interactive_question.answered reference page.
These survey and open-response deliveries never carry isCorrect — the field only appears on question types that report correctness. Like every field without a value, it is omitted from the body, never sent as null. Parse defensively.
Who is answering
What userAlias carries depends on how the genially identifies its audience:
Audience setup
What identifies the respondent
Nothing configured
userAlias is an auto-generated anonymous code: U_ plus five characters, like U_F7V2W.
Track who is accessing
When the genially loads, a modal asks viewers to identify themselves — whatever name or email they type arrives in userAlias. Self-reported: a viewer already logged into Genially skips the modal and is identified with their account name.
Restricted view
Only people with access can open it, logged in with their Genially account — nothing is self-reported: userAlias carries the account name and geniallyUserId the account id.
Track who is accessing is switched on in the genially’s Activity page, Individual tab:
A view is made Restricted from the editor’s Share menu, under “Who can see this creation?”:
From console to storage
To turn the collector into a real backend, replace console.log with your database write and keep three habits: deduplicate on eventId (retries resend the identical body), group rows by userSessionId to reassemble each respondent’s submission, and filter on data.geniallyId — the webhook is team-wide, so answers from every genially of the team reach it. Signature, headers and the retry schedule are covered in Events.
Example
Sync results to Moodle
Genially activities added to a Moodle course through LTI can report every answer and every slide back to that course. This tutorial installs a ready-made Moodle plugin that receives the webhooks and shows teachers, inside each course, how every student did — and syncs a grade per activity to the gradebook.
What you will build
The Genially webhook receiver plugin installed on your Moodle site.
A team webhook that sends the activity of your geniallys to that site.
A teacher dashboard in each course that fills in as students play, with a grade per activity ready to sync to the gradebook.
Before you start
Moodle 4.2 to 5.2, with cron running — deliveries are stored on arrival and processed by cron.
The site reachable over public HTTPS, so Genially can deliver to it.
Your geniallys added to courses as LTI external tools from this same site. The connection is set up in your team settings, at app.genially.com/teams/{teamId}/settings/lti.
1. Install the plugin
Download moodle-geniallywebhook-v1.2.2.zip and, as a site administrator, upload it under Site administration → Plugins → Install plugins. Moodle validates the package and installs it.
Some sites disable installing from a ZIP. Unzip the package inside the local folder of your Moodle code instead — it creates local/geniallywebhook — and run php admin/cli/upgrade.php to complete the installation.
2. Create the webhook
Open Site administration → Plugins → Local plugins → Genially webhook receiver. The Webhook endpoint URL shows the address Genially must deliver to, with a Copy URL button.
In your team settings — app.genially.com/teams/{teamId}/settings/webhooks — press Add webhook, give it a name, paste that URL and subscribe it to these events:
Event
What the plugin does with it
interactive_question.answered
Answers, correctness and the grade. Required.
slide.viewed
Slides visited and time per slide, and the grade of activities without questions. Required.
lti_session.started
Session start. Optional.
lti_session.ended
Session end and duration. Optional.
The two session events are only offered once your team has an LTI connection. Copy the signing secret shown when the webhook is created — it is not shown again.
3. Paste the signing secret
Back on the plugin settings page, paste the secret into Genially signing secret and save. Processing is enabled by default, so the plugin starts accepting deliveries right away. It verifies the x-genially-signature of every delivery against this secret and rejects the rest with a 401.
4. Play an activity
Open a course, launch a Genially activity as a student and answer a few questions. Then, as a teacher of that course, open More → Genially activity: the class overview shows each student’s grade, completion, time and last activity, who needs attention, and the questions most often failed.
Grades
Sync grades on the dashboard writes a 0–10 grade per activity into its own column of the course gradebook. The grade is the share of the activity’s scoring questions the student answered correctly at least once — each question counts once, however many times it was answered — or, for activities without questions, the share of slides visited.
The activity’s own LTI column is left alone: when the LTI link was added with grading, Genially reports its score there for each student, and the plugin never overrides it. Teachers see both and choose.
Troubleshooting
Every delivery the plugin stores is listed under Site administration → Plugins → Local plugins → Genially delivery log, with its status.
Symptom
Likely cause
Every delivery fails with 401
The secret in the plugin settings is not this webhook’s signing secret, or a proxy in front of Moodle rewrites the request body.
Nothing reaches the dashboard and the settings page shows a delivery launched from another site
Only activities launched by LTI from this site are stored; public views and other LMS of your team are acknowledged and dropped. If the address shown is this site, its web address changed after the activity was launched, or the site answers on more than one address.
Deliveries stay pending
Moodle cron is not running.
Deliveries are processed but no student appears
The course or the student of that launch no longer exists on this site.
Failed deliveries are retried by Genially, as described in Events; the plugin recognises a retry and stores it once. The full field lists of what the plugin receives live on the interactive_question.answered and slide.viewed reference pages.
MCP server
Genially MCP server
The Genially MCP server lets AI assistants such as Claude work in Genially on your behalf: build a whole genially with Genially Studio, generate the images, videos, audio and AI Builder pieces it uses, and read your teams, spaces, brand kit and AI credits. It speaks the Model Context Protocol, so any MCP client can connect to it.
The assistant acts as you: it only sees the teams, spaces and geniallys you can access, and it asks before anything that spends AI credits or changes your content.
Server URL
Add this URL to your MCP client. It uses Streamable HTTP and signs you in with your Genially account through OAuth.
https://mcp.genially.com/mcp
What you can do
Build a genially from a description: the assistant plans the slides, creates the genially in your space and builds it in the Genially editor.
Generate the media of a genially — images in one shared style, videos, sound effects, music, voiceovers and AI Builder pieces — after telling you what they cost in AI credits.
Read the brand kit of your team (palettes, text styles, logos, fonts) so what it builds follows your brand.
Check the AI credits of your team: balance, usage and what each AI action costs.
List your teams and spaces, and remember your default team and space.
What you need
A Genially account. The assistant works with the teams and spaces your account can access.
AI credits in your team to generate images, videos, audio and AI Builder pieces. Reading and building cost nothing.
To build a genially, a client that can drive a browser: the Claude desktop app's built-in browser, or Chrome with Claude in Chrome. The genially is built in the Genially editor, in your browser.
How a genially gets built
1. Plan
The assistant turns your request into a plan of slides and picks the team and space, using your defaults when you have them.
2. Create the genially
It creates an empty genially in your space with create_genially. Until the assistant finishes it, or stops, the genially shows in your dashboard as being made with AI, and it can't be opened or changed there.
3. Price and generate the media
It prices the images, videos, audio and AI Builder pieces, tells you the cost against your balance and waits for your yes. Then it generates them and follows the job until everything is ready.
4. Build it in the editor
It opens the genially in the Genially editor in your browser and builds the slides there. You get a genially you can keep editing by hand, not published.
Next steps
MCP server
Connect
Add the Genially MCP server to your AI client and sign in with your Genially account. The first time, the client opens Genially in your browser to ask for your permission.
1. Claude and the Claude desktop app
Open Settings → Connectors, choose Add custom connector, name it Genially and paste the server URL. Then press Connect, sign in to Genially and allow access.
Server URL
https://mcp.genially.com/mcp
2. Claude Code
Add the server from your terminal, then run /mcp inside Claude Code to sign in.
Terminal
claude mcp add --transport http genially https://mcp.genially.com/mcp
3. Cursor
Add the server to ~/.cursor/mcp.json and sign in when Cursor asks.
Any client that supports remote MCP servers over Streamable HTTP with OAuth can connect with the same URL.
Signing in
The server uses OAuth 2.1 with PKCE. Your client registers itself, opens Genially in your browser, and you sign in and allow access. The token it gets is valid only for the MCP server: it cannot be used against the Genially REST API.
The assistant can do in Genially only what your account can do. It never sees teams or spaces you are not a member of.
MCP server
Tools
The 12 tools every MCP client gets once connected. Read-only tools never change anything; no tool deletes content.
You do not call these tools yourself: the assistant picks them from your request. This page is for checking what the assistant can do and what each tool takes and returns.
Id of the genially the assets are for. The user must be able to edit it.
request: object
The asset request (version 1): one style shared by every asset, and a list per kind of asset, each one with its own id.
Output
credits: number
AI credits genially_assets_generate would charge for this request now.
▸images: array of object
One per image of the request, in order.
id: string
Required
action: string
generate: new, changed or failed before, so it is generated and charged. reuse: the same image is already ready or being generated, nothing charged. · One of: generate, reuse
credits: number
Required
▸audios: array of object
One per audio of the request, in order.
id: string
Required
action: string
generate: new, changed or failed before, so it is generated and charged. reuse: the same audio (kind, prompt and length) is already ready or being generated, nothing charged. · One of: generate, reuse
credits: number
Required
▸videos: array of object
One per video of the request, in order.
id: string
Required
action: string
generate: new, changed or failed before, so it is generated and charged when delivered. reuse: the same video is already ready or being generated, nothing charged. · One of: generate, reuse
credits: number
Required
▸aibuilder: array of object
One per AI Builder piece of the request, in order.
id: string
Required
action: string
generate: new, changed or failed before, so it is generated (or changed) and charged. reuse: the same piece is already ready or being generated, nothing charged. · One of: generate, reuse
credits: number
Required
availableCredits: number
AI credits the user can spend: the balance of the genially's team.
pendingCredits: number
Credits of the images still being generated for this genially: not charged yet, but already spoken for.
enough: boolean
Whether availableCredits minus pendingCredits covers credits.
MCP server · Tools
Generate the assets
Generates the images, videos, sound effects, music, voiceovers and AI Builder pieces of a genially, once you have approved their cost. If your team cannot pay for the whole request, nothing is generated.
TOOLgenially_assets_generateWrites
Input
geniallyId: string
Id of the genially the assets are for. The user must be able to edit it.
request: object
The asset request (version 1): one style shared by every asset, and a list per kind of asset, each one with its own id.
Output
jobId: string
Pass it to genially_assets_get to follow the job.
state: string
done when no asset is pending any more: every one is ready or failed. · One of: running, done
▸images: array of object
One per image of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated. ready: url and size are final. failed: see reason. · One of: pending, ready, failed
url: string · optional
Public, https: what window.__imgs gets for this id when the deck runs.
width: integer · optional
Real width in pixels: it depends on the model, not only on the size asked for. · -9007199254740991–9007199254740991
height: integer · optional
Real height in pixels. · -9007199254740991–9007199254740991
transparent: boolean · optional
Whether it really has no background. false when a cut-out was asked for and the background removal failed: it is then a rectangle.
generationId: string · optional
This generation of the picture. A regenerated picture keeps its id and gets a new generationId.
model: string · optional
The image model that made it ('gpt-image-2-medium'…).
credits: number · optional
AI credits it cost, charged only if it succeeds.
reason: string · optional
Why it failed: INAPPROPRIATE_PROMPT (the prompt was refused: rewrite it), TIMED_OUT, ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
▸videos: array of object
One per video of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated (minutes). ready: generationId and url are final. failed: see reason. · One of: pending, ready, failed
url: string · optional
Public, https: the MP4, to look at it.
durationSeconds: number · optional
Length in seconds.
aspectRatio: string · optional
16:9, 9:16 or 1:1, as asked.
generationId: string · optional
The video in the team: what window.__videos gets for this id, which gsVideo inserts. A regenerated video keeps its id and gets a new generationId.
model: string · optional
The video model that made it.
credits: number · optional
AI credits it costs, charged when it is delivered.
reason: string · optional
Why it failed: INAPPROPRIATE_PROMPT (the prompt was refused: rewrite it), TIMED_OUT, ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
▸audios: array of object
One per audio of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated. ready: url and durationSeconds (none for a voiceover) are final. failed: see reason. · One of: pending, ready, failed
url: string · optional
Public, https: the audio file, what window.__audios gets for this id.
durationSeconds: number · optional
Length in seconds.
generationId: string · optional
This generation of the audio. A regenerated audio keeps its id and gets a new generationId.
credits: number · optional
AI credits it cost, charged only if it succeeds.
reason: string · optional
Why it failed: INAPPROPRIATE_PROMPT (the prompt or the text was refused: rewrite it), TIMED_OUT, ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
▸aibuilder: array of object
One per AI Builder piece of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated (minutes). ready: path is final. failed: see reason. · One of: pending, ready, failed
path: string · optional
The published widget: what window.__aibuilder gets for this id, which gsAIBuilder inserts.
sessionId: string · optional
The AI Builder session: a changed prompt for this id continues it.
credits: number · optional
AI credits it cost.
reason: string · optional
Why it failed: TIMED_OUT or ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
retryAfterSeconds: number · optional
Seconds to wait before calling genially_assets_get again; only while running.
MCP server · Tools
Check on the assets
Follows the generation of the images, videos, audio and AI Builder pieces of a genially until every one is ready.
TOOLgenially_assets_getRead-only
Input
jobId: string
The jobId genially_assets_generate answered with.
Output
jobId: string
Pass it to genially_assets_get to follow the job.
state: string
done when no asset is pending any more: every one is ready or failed. · One of: running, done
▸images: array of object
One per image of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated. ready: url and size are final. failed: see reason. · One of: pending, ready, failed
url: string · optional
Public, https: what window.__imgs gets for this id when the deck runs.
width: integer · optional
Real width in pixels: it depends on the model, not only on the size asked for. · -9007199254740991–9007199254740991
height: integer · optional
Real height in pixels. · -9007199254740991–9007199254740991
transparent: boolean · optional
Whether it really has no background. false when a cut-out was asked for and the background removal failed: it is then a rectangle.
generationId: string · optional
This generation of the picture. A regenerated picture keeps its id and gets a new generationId.
model: string · optional
The image model that made it ('gpt-image-2-medium'…).
credits: number · optional
AI credits it cost, charged only if it succeeds.
reason: string · optional
Why it failed: INAPPROPRIATE_PROMPT (the prompt was refused: rewrite it), TIMED_OUT, ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
▸videos: array of object
One per video of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated (minutes). ready: generationId and url are final. failed: see reason. · One of: pending, ready, failed
url: string · optional
Public, https: the MP4, to look at it.
durationSeconds: number · optional
Length in seconds.
aspectRatio: string · optional
16:9, 9:16 or 1:1, as asked.
generationId: string · optional
The video in the team: what window.__videos gets for this id, which gsVideo inserts. A regenerated video keeps its id and gets a new generationId.
model: string · optional
The video model that made it.
credits: number · optional
AI credits it costs, charged when it is delivered.
reason: string · optional
Why it failed: INAPPROPRIATE_PROMPT (the prompt was refused: rewrite it), TIMED_OUT, ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
▸audios: array of object
One per audio of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated. ready: url and durationSeconds (none for a voiceover) are final. failed: see reason. · One of: pending, ready, failed
url: string · optional
Public, https: the audio file, what window.__audios gets for this id.
durationSeconds: number · optional
Length in seconds.
generationId: string · optional
This generation of the audio. A regenerated audio keeps its id and gets a new generationId.
credits: number · optional
AI credits it cost, charged only if it succeeds.
reason: string · optional
Why it failed: INAPPROPRIATE_PROMPT (the prompt or the text was refused: rewrite it), TIMED_OUT, ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
▸aibuilder: array of object
One per AI Builder piece of the request, with its id.
id: string
The id the request gave it.
state: string
pending: still being generated (minutes). ready: path is final. failed: see reason. · One of: pending, ready, failed
path: string · optional
The published widget: what window.__aibuilder gets for this id, which gsAIBuilder inserts.
sessionId: string · optional
The AI Builder session: a changed prompt for this id continues it.
credits: number · optional
AI credits it cost.
reason: string · optional
Why it failed: TIMED_OUT or ERROR. Send the request again to generate it again. · One of: INAPPROPRIATE_PROMPT, TIMED_OUT, ERROR
retryAfterSeconds: number · optional
Seconds to wait before calling genially_assets_get again; only while running.
MCP server · Tools
Manage Genially Creation
Opens a genially in the Genially editor in your browser so the assistant can build its slides there, and records how the build went. It needs a client that can drive your browser.
TOOLgenially_creation_manageWrites
Input
action: string
open: checks the deck and gives what the browser needs to run it in the editor. report: the end of the run, once it is built, reviewed and saved in the browser (or why it couldn't be). release: you stop making the genially before opening any run of its deck (the user stopped, or it can't be made): it is no longer shown as being made, and can be opened again. · One of: open, report, release
geniallyId: string · optional
open: the blank genially the deck is built on. Create it with create_genially (resource blank); the user must be able to edit it. release: the genially you stop making.
deck: string · optional
open: the whole deck.js, as text. It defines window.AG, whose run() builds every slide, as the deck's contract describes. Names its assets by the ids of the asset request.
surfaceVersion: integer · optional
open: the deck surface version the deck was written for, on the first line of deck.d.ts. · Maximum 9007199254740991
runId: string · optional
report: the runId of the last open of the genially.
state: string · optional
report: done when the genially is built and saved; failed when it could not be. · One of: done, failed
log: array · optional
report: gsDeck.result().log, the deck's last log.
slides: array · optional
report: gsDeck.result().slides, the slides of the genially in order.
runtimeCommit: string · optional
report: gsDeck.result().runtimeCommit, the editor's runtime version.
failure: object · optional
report, when failed: why, in a few words.
Output
action: string
One of: open, report, release
geniallyId: string
The genially the deck is built on.
editorUrl: string
The editor of the genially, for the user. Never in the browser.
runId: string · optional
open and report: the run of the deck. Report it with this runId.
state: string · optional
running: opened, the browser has not reported it yet; done: built and saved; failed: see failure. · One of: running, done, failed
released: boolean · optional
release: the genially is no longer shown as being made.
surfaceVersion: number · optional
open: the deck surface the deck was accepted for.
bytes: number · optional
open: size of the deck received.
openUrl: string · optional
open: navigate the browser to it (typed, never a link to click). It works once, for 5 minutes, and opens the editor of this genially, with ?ia-manage=true, on a session that can only edit and save it (in a browser signed in with the user's account, on that session): the editor loads the runtime. If it answers Forbidden (some browser tools navigate as if from another site), open it again from that same page with setTimeout(() => location.assign(location.href), 0). Unauthorized: it expired or was used, open again. Signed in with another account: ask the user to sign out on that page.
▸assets: object · optional
open: the asset ids the deck uses → their URLs, by kind, for gsDeck.run({ assets }): each kind goes to its own map (window.__imgs, __audios, __videos, __aibuilder).
images: object · optional
Optional
audios: object · optional
Optional
videos: object · optional
Optional
aibuilder: object · optional
Optional
slides: array of string · optional
report: the slides of the genially, in order.
thumbnail: string · optional
report: the genially's thumbnail, the picture its card shows. requested: it is drawn from what was saved and shows up in a few minutes; failed: it couldn't be asked for, and the editor makes it the next time someone leaves it after changing the first slide; skipped: the run failed. · One of: requested, failed, skipped
MCP server · Tools
Follow the build of a genially
Shows how the build of a genially went: still running, done, or failed and why, with a line per slide.
TOOLgenially_creation_getRead-only
Input
runId: string
The runId genially_creation_manage open returned.
Output
runId: string
Required
geniallyId: string
Required
editorUrl: string
Link to the genially in the editor.
state: string
running: opened, the browser has not reported it yet; done: built and saved; failed: see failure. · One of: running, done, failed
log: array of string
The deck's __deckLog: 'ok ' or 'error : ' per slide, then the links and 'done'.
slides: array of string
The slides of the genially once it is done, in order.
▸failure: object · optional
Why the run failed, when it did.
code: string · optional
Optional
message: string · optional
Optional
MCP server · Tools
Get Brand Kit
Reads your team's brand kit: palettes, colors and text styles, and on request its logos, backgrounds, images, fonts and team templates.
TOOLbrand_kit_getRead-only
Input
teamId: string
Id of the team whose brand kit should be read. Use user_teams_get to obtain valid ids.
include: array · optional
Sections to return. Default when omitted: ["palettes", "colors", "textStyles", "branding"]. Pass an explicit list to request other sections (e.g. ["logos"], ["fonts"], or ["palettes","colors","textStyles","logos","backgrounds","images","fonts","branding"] for everything).
Output
▸palettes: array of object · optional
Brand palettes. Present unless excluded via include.
id: string · optional
Palette id. Pass to brand_kit_manage resource="palette" delete/set_default.
primary: string · optional
Pattern: ^#[0-9a-fA-F]{6}$
secondary: string · optional
Pattern: ^#[0-9a-fA-F]{6}$
isDefault: boolean · optional
True when this is the team default palette. The default palette cannot be deleted via brand_kit_manage resource="palette" action="delete"; promote another palette with action="set_default" first.
▸colors: array of object · optional
Standalone team colors (not part of any palette). Manage with brand_kit_manage resource="color".
id: string · optional
Color id. Pass to brand_kit_manage resource="color" action="delete".
color: string · optional
Color value in rgba() form (e.g. "rgba(57,49,184,1)"). brand_kit_manage resource="color" action="add" accepts hex #RRGGBB and stores it in this rgba form.
▸textStyles: object · optional
Brand text styles for title_1, title_2, subtitle, content.
▸title_1: object · optional
bold: boolean · optional
Optional
italic: boolean · optional
Optional
underline: boolean · optional
Optional
uppercase: boolean · optional
Optional
color: string · optional
Pattern: ^#[0-9a-fA-F]{6}$
▸fontFamily: object · optional
name: string · optional
Font family name (e.g. "Roboto" or a custom font name).
url: string · optional
Custom font file URL when name refers to one.
▸fontSize: object · optional
value: number · optional
Numeric size value.
unit: string · optional
Size unit (e.g. "px", "em").
▸title_2: object · optional
bold: boolean · optional
Optional
italic: boolean · optional
Optional
underline: boolean · optional
Optional
uppercase: boolean · optional
Optional
color: string · optional
Pattern: ^#[0-9a-fA-F]{6}$
▸fontFamily: object · optional
name: string · optional
Font family name (e.g. "Roboto" or a custom font name).
url: string · optional
Custom font file URL when name refers to one.
▸fontSize: object · optional
value: number · optional
Numeric size value.
unit: string · optional
Size unit (e.g. "px", "em").
▸subtitle: object · optional
bold: boolean · optional
Optional
italic: boolean · optional
Optional
underline: boolean · optional
Optional
uppercase: boolean · optional
Optional
color: string · optional
Pattern: ^#[0-9a-fA-F]{6}$
▸fontFamily: object · optional
name: string · optional
Font family name (e.g. "Roboto" or a custom font name).
url: string · optional
Custom font file URL when name refers to one.
▸fontSize: object · optional
value: number · optional
Numeric size value.
unit: string · optional
Size unit (e.g. "px", "em").
▸content: object · optional
bold: boolean · optional
Optional
italic: boolean · optional
Optional
underline: boolean · optional
Optional
uppercase: boolean · optional
Optional
color: string · optional
Pattern: ^#[0-9a-fA-F]{6}$
▸fontFamily: object · optional
name: string · optional
Font family name (e.g. "Roboto" or a custom font name).
url: string · optional
Custom font file URL when name refers to one.
▸fontSize: object · optional
value: number · optional
Numeric size value.
unit: string · optional
Size unit (e.g. "px", "em").
▸logos: array of object · optional
Team logos. Present only when include contains "logos" (or include is omitted).
id: string · optional
Logo id.
image: string · optional
Public URL of the logo image file. Falls back to the default Genially logo asset when the team has not uploaded a custom logo. Render as markdown image when surfacing the logo to the user.
link: string · optional
Team-wide click-through URL for the logo on published geniallys.
position: string · optional
Logo placement (e.g. "bottom:left").
size: string · optional
Logo size token (e.g. "small", "medium").
show: boolean · optional
Whether the logo is shown on published geniallys.
isDefault: boolean · optional
Whether this logo is marked as the team default.
hasBeenModified: boolean · optional
True when the logo was ever modified from its initial state.
▸backgrounds: array of object · optional
Brand kit backgrounds. Present only when include contains "backgrounds" (or include is omitted).
id: string · optional
Background id.
backgroundUrl: string · optional
Public URL of the background image file.
filename: string · optional
Optional
▸images: array of object · optional
Brand kit images. Present only when include contains "images" (or include is omitted).
id: string · optional
Image id.
imageUrl: string · optional
Public URL of the image file.
filename: string · optional
Optional
▸fonts: array of object · optional
Custom fonts uploaded to the brand kit. Present only when include contains "fonts" (or include is omitted).
id: string · optional
Custom font id. Pass to brand_kit_manage resource="typography" action="delete_custom_font".
name: string · optional
Internal font name.
displayName: string · optional
Human-readable font name shown in the brand kit UI. Use as fontFamily.name in brand_kit_manage resource="typography" action="set_text_style".
url: string · optional
Permanent URL of the uploaded font file. Use as fontFamily.url in brand_kit_manage resource="typography" action="set_text_style".
format: string · optional
Font file format (e.g. "ttf", "otf").
▸branding: object · optional
Team-level branding settings (loader + team-wide visibility flags). Present only when include contains "branding" (or include is omitted).
customLoaderUrl: string · optional
Public URL of the team custom loader image (preloader shown while a published genially loads). Omitted when the team uses the default loader. Manage with brand_kit_manage resource="loader".
showLoader: boolean · optional
Whether the loader is shown on published geniallys.
hideLogo: boolean · optional
Team-wide flag that hides every logo on published geniallys when true.
▸teamTemplates: array of object · optional
Team templates of the team. Present only when include contains "teamTemplates".
id: string · optional
Team template id.
name: string · optional
Team template name.
image: string · optional
Rendered preview image URL, if available.
typeGenially: number · optional
Numeric type/subcategory of the source genially.
idFromTemplate: string · optional
Id of the source marketplace template, if the genially was created from one.
MCP server · Tools
Get AI Credits
Reads your team's AI credits: the balance, the usage and what each AI action costs.
TOOLai_credits_getRead-only
Input
resource: string
AI credits information to read.
balance: Current AI credits balance: available credits, plan and extra credits used, and renewal date. Credits belong to the team, shared by its members. Compare with costs before spending credits.
usage: AI credits consumption report: total credits used, breakdown by AI action, and per-member usage. Snapshot of the wallet counters (no date filtering).
costs: AI credits each AI action costs, including creating a genially with AI with or without images. Same prices for every team. Compare with balance before spending credits. · One of: balance, usage, costs
action: string · optional
Always "get"; it can be omitted. · One of: get
teamId: string · optional
Id of the team to operate on. Use user_teams_get to obtain valid ids. Not needed for costs.
Output
resource: string
One of: balance, usage, costs
action: string
Required
result: object
Outcome of the action, e.g. the updated value or the created id.
MCP server · Tools
List User Teams
Lists the teams you belong to, as a member or as a guest.
TOOLuser_teams_getRead-only
Input
Takes no input.
Output
▸teams: array of object
id: string
Required
name: string
Required
logo: string · optional
Optional
membership: string
One of: member, guest
MCP server · Tools
List Team Spaces
Lists the spaces of a team that you can access, up to 50 at a time.
TOOLteam_spaces_getRead-only
Input
teamId: string
Id of the team whose spaces will be listed. Must be a 24-character hex ObjectId. Use the user_teams_get tool to obtain valid ids.
limit: integer · optional
Maximum number of spaces to return (1-50, default 50) · 1–50
last: string · optional
Cursor for pagination: id of the last space returned in the previous page
Output
▸spaces: array of object
id: string
Required
name: string
Required
type: string
Required
▸owner: object · optional
Owner of the space, when the space has one.
id: string · optional
Optional
name: string · optional
Optional
email: string · optional
Optional
MCP server · Tools
Read Genially Settings
Reads your default team and space, so the assistant knows where to work without asking you.
TOOLclient.settings.readRead-only
Input
Takes no input.
Output
▸schema: object
type: string
Required
▸properties: object
▸defaultTeam: object
type: string
Required
title: string
Required
description: string · optional
Optional
enum: array of string
Required
▸defaultSpace: object
type: string
Required
title: string
Required
description: string · optional
Optional
enum: array of string
Required
required: array of string
Required
▸values: object
defaultTeam: string
Required
defaultSpace: string
Required
▸layout: array of object
kind: string
Required
title: string
Required
▸items: array of object
kind: string
Required
property: string
Required
▸defaultIds: object
Ids behind the current values, ready to pass as teamId / spaceId to other tools. null when there is no default.
teamId: string · optional
Required
spaceId: string · optional
Required
MCP server · Tools
Update Genially Settings
Changes your default team or space. Changing the team clears the default space, unless you also pick a space of the new team.
TOOLclient.settings.updateWrites
Input
set: object
Only the settings that change. Omitted settings keep their value.
Output
▸values: object
defaultTeam: string
Required
defaultSpace: string
Required
▸defaultIds: object
Ids behind the current values, ready to pass as teamId / spaceId to other tools. null when there is no default.
teamId: string · optional
Required
spaceId: string · optional
Required
MCP server
Example prompts
Once you are connected, ask in your own words. These prompts show what the server can do and what the assistant does with each one.
Build a genially
Prompt
Create a 6-slide genially about the water cycle for 10-year-olds, with an image on every slide. Use my team’s brand kit.
The assistant reads your brand kit, plans the slides and shows you the plan. It creates the genially in your default space, prices the images and waits for your yes before generating them. Then it builds the slides in the Genially editor and gives you the link.
Check your AI credits
Prompt
How many AI credits does my team have left, and how much does a video cost?
The assistant reads your team’s balance and the cost of each AI action with ai_credits_get.
Pick where geniallys are created
Prompt
Which spaces do I have in my Marketing team? Use Campaigns from now on.
The assistant lists your teams and their spaces, and saves Campaigns as your default space with client.settings.update, so later requests land there without asking.
Read your brand
Prompt
What colors and fonts does our brand kit have?
The assistant reads the palettes, text styles and fonts of your team with brand_kit_get.
MCP server
Troubleshooting
Limits of the server, what it does with your data and what to do when something fails.
Common problems
Problem
What to do
The Genially tools do not show up
Disconnect the server in your client and connect it again. Your client gets a fresh list of tools when it reconnects.
The assistant says it cannot build the genially
Building happens in the Genially editor, in your browser. Use a client that can drive a browser: the Claude desktop app’s built-in browser, or Chrome with Claude in Chrome.
Generating the media fails before it starts
Your team does not have enough AI credits for the whole request. Nothing is generated and nothing is charged; ask for fewer pieces or add credits.
Generating takes a long time
Images and sound effects are ready in seconds, music and videos take a few minutes, and AI Builder pieces take 8 to 12 minutes. The assistant keeps checking and tells you how long is left.
A genially shows as being made with AI and cannot be opened
The assistant is still making it, and frees it when it finishes or stops. If the conversation ended without that, ask the assistant to stop making it; otherwise it is freed by itself after six hours.
The assistant asks again which team or space to use
Tell it which ones to keep as your default: it saves them and uses them in later requests.
Limits
Limit
Value
Tool calls
120 per minute per user.
AI credits
Generating media spends your team’s AI credits. Reading and building cost nothing.
Your data
The server reads and writes only what each tool needs, with your Genially permissions. It does not read your conversation with the assistant. What it creates is saved in your space, like anything you create in Genially.