Why is the REST API important?

What is REST API in the first place? Essentially, REST (REpresentation State Transfer) API is like a bridge that allows different parts of your website to communicate and share (AKA transfer) information (AKA state). If this bridge is blocked, your calendar will not work as expected because this essential communication is shut down.

The Events Calendar REST API is built off the WordPress Core REST API. This means that all the key concepts and security features in WP Core are already baked in.

Our updated views require the REST API endpoints to be accessible. This requirement was made to improve the page loading efficiency compared to our legacy views by fetching context/event information from the database using the API provided by tribe_context() (instead of using PHP initial state requests and AJAX requests as the legacy views did).

In less technical terms, the events endpoints are the methods that the page trying to load your calendar (the client) communicates with the database where all the information about each event is stored (the server). You can see all available endpoints on your site by adding /wp-json to the end of the URL. Understandably, if something is blocking this communication bridge, things break down quickly.

We have more developer-focused documentation here:

Troubleshooting

Let’s say you’re running into issues trying to view or edit events on your site. Chances are the REST API is blocked somehow. This could be indicated by this error message:

Warning: The Events Calendar REST API endpoints are not accessible, which can severely limit calendar functionality. This may be due to a server configuration or another plugin blocking access to the REST API.
Please have your hosting provider or system administrator adjust settings to ensure that the necessary endpoints are accessible.

To get your calendar back on track, it’s essential to identify what’s blocking the REST API. In a lot of cases, this can be caused by a firewall or security plugin accidentally identifying the API as a threat and blocking the endpoints.

So what can you do if you suspect that your REST API might be blocked? Start by completing a conflict test to determine if a plugin might be blocking the endpoints.

If the REST API is still blocked with just The Events Calendar activated and a default theme, try reaching out to your hosting provider or website administrator for assistance. You can ask specifically about any firewall or security settings that might be affecting the calendar’s endpoints.

Once the issue is resolved and the required TEC REST API endpoints are accessible again, your calendar should start functioning as intended.

If you’re still facing issues, please reach out to our Support Team. We’ll be happy to assist you!