Title: API error
Last modified: January 22, 2025

---

# API error

 *  [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/)
 * I am getting this below API error if enabled this plugin. How can we fix this.
   I have enabled “Auto offload new images” “Keep media library structure” “Parse
   page for images” “Logging” options in the plugin.
 * ![](https://i0.wp.com/stagingblog.webnexs.com/wp-content/uploads/2025/01/Screenshot-
   2025-01-22-181357.png?ssl=1)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/api-error-79/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/api-error-79/page/2/?output_format=md)

 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18259784)
 * [@venkat01](https://wordpress.org/support/users/venkat01/), this is interesting.
   What’s the error? Can you please expand the 400 Bad Request column?
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260078)
 * Kindly check the screenshot
 * ![](https://i0.wp.com/stagingblog.webnexs.com/wp-content/uploads/2025/01/Screenshot-
   2025-01-23-094523.png?ssl=1)
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260082)
 * [@venkat01](https://wordpress.org/support/users/venkat01/) , I think the issue
   is an incorrect API token (or something is blocking the request on your hosting).
   Please have a look at the detailed setup guide here: [https://vcore.au/tutorials/how-to-setup-cloudflare-images-plugin/](https://vcore.au/tutorials/how-to-setup-cloudflare-images-plugin/)
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260110)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) When I select “Disconnect
   from API” to use a different API token, even if I enter incorrect credentials
   after that, it still connects, and the dashboard appears. I’m not sure if it’s
   still using the previous API token. Could you please check this?
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260115)
 * [@venkat01](https://wordpress.org/support/users/venkat01/), yeah, the plugin 
   doesn’t verify the validity of the token, there’s no easy way to do that without
   offloading an image first. The doc I linked explains how to verify that everything
   is working.
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260143)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) I referred to the 
   doc and followed the below steps, but I’m still encountering an API error in 
   Query Monitor.
    1. Created an API token as per the doc, copied both the account ID and token, and
       used it to log in to the plugin.
    2. Added the account ID and Cloudflare API token to the wp-config.php file.
    3. In the media library, it displays “Status: Not offloaded Actions.” When I manually
       attempt to upload to Cloudflare, I receive the following response:
 * {“success”:false,”errors”:[{“code”:10001,”message”:”Unable to authenticate request”}]}
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260190)
 * [@venkat01](https://wordpress.org/support/users/venkat01/), that means that the
   token does not have required permissions… for some reason. Do you have Cloudflare
   Images enabled on your Cloudflare account?
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260238)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) Yes enabled. We are
   using cloudflare Images already
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260252)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) Tested the API token
   too using curl and below is the response
 * status”:”active”},”success”:true,”errors”:[],”messages”:[{“code”:10000,”message”:”
   This API Token is valid and active”,”type”:null}]}\
 * Tested for server blockage, and there is none. We are successfully connected 
   to Cloudflare from the server using the same API token. Kindly guide on this
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18260474)
 * [@venkat01](https://wordpress.org/support/users/venkat01/) , I’m not sure what
   else to check, to be honest. You can try logging out in the plugin, and when 
   logging back in check the option to store credentials in the database. And the
   other option is to verify the key is being stored correctly. Maybe there’s a 
   space or something added when pasting it in?
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18262727)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) I think the issue 
   might be related to some file permissions. I want to try starting fresh with 
   new credentials. But, when I delete and reinstall the plugin, it directly shows
   the dashboard. How can I completely delete all plugin data and start over?
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18262732)
 * [@venkat01](https://wordpress.org/support/users/venkat01/) , if the plugin is
   showing the dashboard, that means that the credentials are either stored in the
   database or wp-config.php and were not removed, for some reason.
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18262852)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) I manually deleted
   the following rows from the database and removed the CF details from the `wp-
   config.php` file:
   cf-images-settings, cf-images-version, cf-images-account-id,
   cf-images-api-token
 * I also cleared the plugin cache and the Cloudflare cache. But, even after deleting
   and reinstalling the plugin, I am still being redirected to the dashboard. Is
   there anything else I missed? Kindly help.
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18263157)
 * [@venkat01](https://wordpress.org/support/users/venkat01/), could you please 
   if you have the `CF_IMAGES_ACCOUNT_ID` and `CF_IMAGES_KEY_TOKEN` constants in`
   wp-config.php`? This is the last reason why the dash would show.
 * Best regards,
   Anton
 *  Thread Starter [venkat01](https://wordpress.org/support/users/venkat01/)
 * (@venkat01)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/#post-18269321)
 * [@vanyukov](https://wordpress.org/support/users/vanyukov/) I deleted the old 
   API token and tried using a new one, and it’s now working. Thanks for your help!
   But, SVG images are showing as “Unsupported Format” in the offload status and
   are not being offloaded. Could you please help with this as well?

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/api-error-79/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/api-error-79/page/2/?output_format=md)

The topic ‘API error’ is closed to new replies.

 * ![](https://ps.w.org/cf-images/assets/icon-256x256.png?rev=2930278)
 * [Offload, AI & Optimize with Cloudflare Images](https://wordpress.org/plugins/cf-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf-images/)
 * [Active Topics](https://wordpress.org/support/plugin/cf-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf-images/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/api-error-79/page/2/#post-18269567)
 * Status: not resolved