MEC event API addon allows easy copying of events, exporting scripts, and downloading JSON files. It supports events from WordPress and any web application on any platform. It includes Single Events, shortcodes, immediate activation after installation, and domain management.
Installing Event API Addon
For installation, first, make sure that both MEC and the Event API addon are installed and activated. Then, head over to your WordPress Dashboard > Plugins > Add New and upload, install, and activate the addon
Note: The Event API Addon is compatible with both the lite and Pro versions.
Using Event API
To use the event API on the shortcode or single event page, click “Create API” on your chosen shortcode or event.
By clicking Create API, you will be directed to a page where you can receive your API.
The left side provides access to domains that display events. To manage this, enter the specific domain(s) or set API for all domains.
To remove an API, select the domain(s) or All Domains and click the trash icon. This will remove the API from all the added domains. Click Generate Button once you’re done.
There are three fields on the right side. The first one contains a script that you can copy to the clipboard. You can use this script to display any content you want, but you need to specify the domains where you want to display it. The second field contains the same content in JSON format, which you can use to receive different content for your web application.
You can see samples of the used API below:
To ensure your script is functional, make sure to verify two things:
- The script needs to be enabled on all domains or a specific one.
- Contact your host provider and make sure that the ability to create iframes on your website is enabled.
When you install the Event API Addon, you can access settings in MEC Settings > Settings > Event API. From there, you can include your source’s header and footer in the destination website and limit the number of events in the shortcode output.
Please note that if you are using any of the website loading speed optimization plugins, these plugins might be the reason for not loading the external script links on your web pages.
Since the “Event API Addon” has a script for showing your events, you need to exclude “external links” in those plugins, so they won’t get ignored and can work properly.