Title: Gives Error
Last modified: March 31, 2025

---

# Gives Error

 *  [jtohme](https://wordpress.org/support/users/jtohme/)
 * (@jtohme)
 * [1 year ago](https://wordpress.org/support/topic/contain-bugs/)
 * Gives error: The Optimization Detective REST API endpoint is unavailable.
    -  This topic was modified 1 year ago by [jtohme](https://wordpress.org/support/users/jtohme/).
    -  This topic was modified 1 year ago by [jtohme](https://wordpress.org/support/users/jtohme/).
    -  This topic was modified 1 year ago by [jtohme](https://wordpress.org/support/users/jtohme/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [1 year ago](https://wordpress.org/support/topic/contain-bugs/#post-18389759)
 * [@jtohme](https://wordpress.org/support/users/jtohme/) This error message was
   given specifically to warn you that the plugin would not work as it requires 
   the REST API to be available for gathering the URL Metrics. Have you turned off
   the REST API from being accessible to unauthenticated users? If so, then the 
   plugin is working as expected. This is explained in the plugin’s [description](https://wordpress.org/plugins/optimization-detective/#:~:text=Your%20site%20must%20currently%20have%20the%20REST%20API%20accessible%20to%20unauthenticated%20frontend%20visitors%20since%20this%20is%20how%20real%20user%20metrics%20are%20collected%20about%20pages%20on%20your%20site%3B%20nevertheless%2C%20exploration%20is%20underway%20for%20providing%20alternative%20mechanisms%20for%20collecting%20the%20metrics.)
   on the directory:
 * > Your site must currently have the **REST API accessible** to unauthenticated
   > frontend visitors since this is how real user metrics are collected about pages
   > on your site; nevertheless, [exploration](https://github.com/WordPress/performance/issues/1311)
   > is underway for providing alternative mechanisms for collecting the metrics.
 * So what you’re experiencing does not seem to be a bug. I’d appreciate it if you
   could revise your review.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [1 year ago](https://wordpress.org/support/topic/contain-bugs/#post-18392586)
 * [@jtohme](https://wordpress.org/support/users/jtohme/) It’s not actually for 
   developers only. Do you have a plugin that is disabling the REST API for frontend
   visitors? That’s the issue here. It should work out of the box otherwise.
 * The plugins [Image Prioritizer](https://wordpress.org/plugins/image-prioritizer/)
   and [Embed Optimizer](https://wordpress.org/plugins/embed-optimizer/) use Optimization
   Detective as a dependency plugin. The expectation is that regular users (non-
   developers) would install these plugins along with Optimization Detective without
   needing to be a developer. But as mentioned above, if you disable the REST API
   then it won’t work. But this is explained in the readme (including the [readme](https://wordpress.org/plugins/image-prioritizer/)
   for Image Prioritizer).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Gives Error’ is closed to new replies.

 * ![](https://ps.w.org/optimization-detective/assets/icon.svg?rev=3098164)
 * [Optimization Detective](https://wordpress.org/plugins/optimization-detective/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/optimization-detective/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/optimization-detective/)
 * [Active Topics](https://wordpress.org/support/plugin/optimization-detective/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/optimization-detective/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/optimization-detective/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/contain-bugs/#post-18392586)