Plugin name: JEM - Embed Plugin
Extension: plg_content_jemembed
Plugin group: Content
Applies to: JEM 5.0 beta 3 for Joomla 5/6 and JEM 4.5 beta 5 for Joomla 4/5, when the plugin is available in the installed package.
Overview
The JEM Embed Content Plugin provides a JSON endpoint for JEM events. It is designed for external integrations, JavaScript widgets, remote websites, custom frontends, and other systems that need to read JEM event data without rendering a normal Joomla module or article table.
The endpoint is exposed through Joomla's com_ajax plugin mechanism. It can optionally require an API token, and it supports filters for event type, featured status, categories, venues, maximum results, title length, and display modes.
Requirements
- The plugin must be enabled in System → Manage → Plugins.
- JEM must be installed and have accessible events.
com_ajax requests must be allowed by the Joomla site.
- If token protection is enabled, requests must include a valid token.
Endpoint
index.php?option=com_ajax&plugin=jemembed&group=content&format=json
With token protection enabled:
index.php?option=com_ajax&plugin=jemembed&group=content&format=json&token=YOUR_SECURITY_TOKEN
Plugin Options
| Option | Default | Description | Recommendation |
| Require API Token |
Yes |
Requires each API request to include a valid token in the token query parameter. |
Keep enabled for public websites. |
| API Tokens |
Empty |
Comma-separated list of allowed API tokens. |
Use long, random, non-guessable token values. |
Security note: If Require API Token is enabled but no token is configured, all requests will fail with an invalid or missing token response.
Request Parameters
| Parameter | Default | Allowed Values | Description |
type |
unfinished |
today, unfinished, upcoming, ongoing, archived, newest, open, all |
Selects which events are returned. |
featured |
off |
on, off |
Filters featured events. In this plugin, on filters to featured events and off filters to non-featured events. |
title |
on |
on, link, off |
Sets the title display mode returned in the JSON payload. |
cuttitle |
100 |
Positive integer |
Maximum display title length. |
date |
on |
on, link, off |
Sets date display mode in the response metadata. |
time |
on |
on, off |
Controls time display mode in the response metadata. |
enddatetime |
on |
on, off |
Controls end date/time display mode in the response metadata. |
catids |
Empty |
Comma-separated IDs |
Limits results to selected JEM categories. |
category |
on |
on, link, off |
Sets category display mode in the response. |
venueids |
Empty |
Comma-separated IDs |
Limits results to selected JEM venues. |
venue |
on |
on, link, off |
Sets venue display mode in the response. |
max |
100 |
Positive integer |
Maximum number of events returned. |
dateformat |
Empty |
PHP date format |
Formats dates in the JSON response. |
timeformat |
Empty |
PHP time format |
Formats times in the JSON response. |
token |
Required when enabled |
Configured API token |
Authenticates the request when token validation is enabled. |
Response Structure
A successful response returns a JSON object with success, meta, and data.
{
"success": true,
"meta": {
"count": 2,
"parameters": {
"type": "upcoming",
"max_events": "2"
}
},
"data": [
{
"id": 123,
"title": {
"full": "Event title",
"display": "Event title",
"url": "https://example.com/...",
"display_mode": "on"
},
"slug": "123:event-title",
"description": "Event intro text",
"featured": false,
"dates": {
"start_date": "2026-06-15",
"end_date": null,
"start_time": "20:00:00",
"end_time": null,
"formatted_start_date": "15.06.2026",
"formatted_start_time": "20:00",
"formatted_end_time": "",
"date_url": "https://example.com/...",
"date_display_mode": "on",
"time_display_mode": "on",
"enddatetime_display_mode": "on"
},
"venue": {
"id": 4,
"name": "Venue name",
"slug": "4:venue-name",
"url": "https://example.com/...",
"city": "City",
"state": "County",
"country": "Country",
"display_mode": "on"
},
"categories": []
}
]
}
Error Response
If token validation fails, the plugin returns:
{
"success": false,
"error": "Invalid or missing API token"
}
Examples
Upcoming Events With Token
index.php?option=com_ajax&plugin=jemembed&group=content&format=json&token=YOUR_TOKEN&type=upcoming&max=5
Featured Events From Categories 2 and 14
index.php?option=com_ajax&plugin=jemembed&group=content&format=json&token=YOUR_TOKEN&type=upcoming&featured=on&catids=2,14&max=3
Venue-Specific Events
index.php?option=com_ajax&plugin=jemembed&group=content&format=json&token=YOUR_TOKEN&venueids=4&type=unfinished
Archived Events With Custom Date Format
index.php?option=com_ajax&plugin=jemembed&group=content&format=json&token=YOUR_TOKEN&type=archived&dateformat=Y-m-d&max=20
Frontend Integration Notes
- The plugin returns data only; it does not render an event list by itself.
- External JavaScript, another site, or a custom template must consume the JSON response.
- Event, venue, category, and date URLs are returned as absolute URLs.
- The response includes raw event intro text in the
description field.
- The endpoint uses JEM's event list model, so publication state and configured filters still matter.
Security Recommendations
- Keep Require API Token enabled unless the endpoint is intentionally public.
- Use long random tokens and avoid simple words or predictable values.
- Rotate tokens if they are shared with third-party websites.
- Do not expose more event data than needed; use
max, catids, and venueids.
- Use HTTPS on the Joomla site so tokens are not sent over plain HTTP.
Troubleshooting
| Problem | Possible Cause | Suggested Fix |
Invalid or missing API token |
Token protection is enabled and the request token is missing or not listed in plugin settings. |
Add token=YOUR_TOKEN to the request and verify the configured token list. |
| No events returned. |
Filters are too restrictive, no matching events exist, or publication state does not match. |
Test with type=all&max=20, then add filters again. |
| Featured events do not appear. |
featured=off filters to non-featured events. |
Use featured=on when requesting featured events. |
| External site cannot read the response. |
Browser CORS policy, server headers, or mixed HTTP/HTTPS content may block the request. |
Use HTTPS and configure the consuming site/server appropriately. |
| URLs are not what was expected. |
Joomla routing, menu item selection, or SEF configuration affects generated routes. |
Check JEM menu items and Joomla SEF routing configuration. |
Related Development Notes
The following GitHub references are the most useful for this plugin. Direct references are prioritised first, then related documentation and integration issues.