Title: Error accessing REST API
Last modified: April 6, 2022

---

# Error accessing REST API

 *  Resolved [alanthompson64](https://wordpress.org/support/users/alanthompson64/)
 * (@alanthompson64)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/error-accessing-rest-api/)
 * The Instant Images plugin reports a red warning bar:
 * There was an error accessing the WP REST API.
    Instant Images requires access
   to the WP REST API via POST request to fetch and upload images to your media 
   library.
 * I asked my web host for assistance and this was their response:
 *     ```
       I was able to replicate the error message, however as far as I can tell, the issue is a 404 rather than the request being blocked:
   
       There are only two POST requsts and the only one which apparently errors is the first which looks like the plugin attempting a test.
       85.92.65.92 - - [05/Apr/2022:18:36:14 +0100] "POST /wp-json/instant-images/test/ HTTP/1.1" 404 105 "[My Domain]/wp-admin/upload.php?page=instant-images" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
       85.92.65.92 - - [05/Apr/2022:18:38:14 +0100] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 51 "[My Domain]/wp-admin/upload.php?page=instant-images" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0"
   
       If this were a block, a 403 would be expected rather than a 404 which suggests that the API is not correctly configured to respond to the request.
   
       I can see at the link below a similar issue discussed by the plugin developer who made an error when pushing an update to the plugin. His suggestion was to uninstall and then re-install the plugin completely.
       https://wordpress.org/support/topic/there-was-an-error-accessing-the-wp-rest-api-instant-images-requires-access-to/
   
       If this does not resolve the issue I would advise showing the above to the plugin developer for their input as this isn't a case of the API being blocked as far as I can tell.
       ```
   
 * ———-
 * I have tried uninstalling and re-installing the plugin, but the error remains.
   
   This means that the plugin fails to download and resize images to add to the 
   media library.
 * Grateful if you can assist, as it’s a really fabulous plugin to have (thank you!)
   
   Alan

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

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/error-accessing-rest-api/#post-15532914)
 * [@alanthompson64](https://wordpress.org/support/users/alanthompson64/) Do you
   have any security plugins running that would be blocking the REST API? It’s also
   possible you have a server rule blocking access to the API.
 * > I have tried uninstalling and re-installing the plugin, but the error remains.
 * That wouldn’t solve this issue. Something on your server is blocking the REST
   API.
 *  Thread Starter [alanthompson64](https://wordpress.org/support/users/alanthompson64/)
 * (@alanthompson64)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/error-accessing-rest-api/#post-15535583)
 * Solved – I have a caching plugin called Swift Performance, which also has a “
   plugin organiser” that allows access rules to be created for plugins, to avoid
   bloat where they are not needed.
    At some point, I must have added Instant Images
   to this, to block Front-End access (thinking the plugin is only needed on the
   back-end). However, removing this rule has fixed the issue.
 * thank you
    Alan
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/error-accessing-rest-api/#post-15537955)
 * [@alanthompson64](https://wordpress.org/support/users/alanthompson64/) Nice one!

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

The topic ‘Error accessing REST API’ is closed to new replies.

 * ![](https://ps.w.org/instant-images/assets/icon-256x256.png?rev=2504172)
 * [Instant Images - One-click Image Uploads from Unsplash, Openverse, Pixabay, Pexels, and Giphy](https://wordpress.org/plugins/instant-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/instant-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/instant-images/)
 * [Active Topics](https://wordpress.org/support/plugin/instant-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/instant-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/instant-images/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/error-accessing-rest-api/#post-15537955)
 * Status: resolved