Title: API error
Last modified: October 26, 2021

---

# API error

 *  Resolved [eprince](https://wordpress.org/support/users/eprince/)
 * (@eprince)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/)
 * When I click on Repair all Repairable files the there it shows an error “WordFence
   API error: An error occured trying to open the requested file”
    Screen Shot: 
   [https://prnt.sc/1xdwkbc](https://prnt.sc/1xdwkbc)

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/#post-15010807)
 * Hi [@eprince](https://wordpress.org/support/users/eprince/),
 * How many files is this occurring for when attempting to use the “repair all” 
   button? I have seen a case before where clicking the individual “repair” button
   next to each file is successful – which would at least rule out a single file
   causing the whole repair process to fail. However, if you have a large number
   of files showing up so this approach isn’t feasible, or could suggest a compromized
   website, please let me know.
 * If the individual files cannot be repaired or there are too many, please can 
   you send a diagnostic report (which should show me the scan results) to **wftest
   @ wordfence . com**? You can find the link to do so at the top of the **Wordfence
   > Tools > Diagnostics** page. Then click on **“Send Report by Email”**. Please
   add your forum username where indicated and _respond here after you have sent
   it._
 * **NOTE:** It should look as follows – Screenshot of [Tools > Diagnostic > Send by Email](https://www.wordfence.com/wp-content/uploads/2021/09/diagnosticsendbyemail.png)
 * Thanks,
 * Peter.
 *  Thread Starter [eprince](https://wordpress.org/support/users/eprince/)
 * (@eprince)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/#post-15012741)
 * 1. There is only 3 file attempting to use the “repair all” button.
 * 2. I have already tried the individual “repair” button but there is also an error“
   WordFence API error: An error occurred trying to open the requested file.” Screenshot:
   [https://prnt.sc/1xigjjr](https://prnt.sc/1xigjjr)
 * 3. Diagnostic report has been sent successfully on 27-Oct-21 with forum username
   [@eprince](https://wordpress.org/support/users/eprince/)
 * Hope you are able to guide me properly to solve the issue on priority.
 * Thanks
 *  Thread Starter [eprince](https://wordpress.org/support/users/eprince/)
 * (@eprince)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/#post-15021165)
 * Still waiting for your reply.
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/#post-15025494)
 * Hi [@eprince](https://wordpress.org/support/users/eprince/),
 * I have received your diagnostic and have reviewed the results along with anything
   that might be causing an issue including CDN and installed plugins.
 * What is unusual about the error you’re receiving when trying to repair is that
   the diagnostics communication to our servers and back to our site is reporting
   back as OK. Usually a communication error such as this API error would go hand-
   in-hand with wider communication errors. However, there are still some things
   you can check.
 * Head over to your site and ensure **Wordfence > All Options > General Wordfence
   Options > How does Wordfence get IPs**. Since you’re using Cloudflare, select“**
   Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use
   if you’re using Cloudflare.**”. I actually suspect you’re already using this 
   but want to be thorough.
 * Its possible your site IP is either incorrect or not whitelisted in Cloudflare.
   I see that your WordPress cron jobs are overdue too, which means it’s not just
   Wordfence that can’t connect back, but WordPress is failing when trying to start
   cron.
 * Check and verify the correct IP was whitelisted in Cloudflare. If you want to
   verify the sites IP address, navigate to **Wordfence > Tools > Diagnostic > Connectivity**
   and you will see “**IP(s) used by this server**“. Make sure the first IP here
   is the IP that is whitelisted in Cloudflare.
 * Also, if you have Cloudflare’s “under attack” mode enabled too, you could try
   temporarily disabling that. It’s meant to block automated connections and could
   be related.
 * Thanks,
 * Peter.
 *  Thread Starter [eprince](https://wordpress.org/support/users/eprince/)
 * (@eprince)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/#post-15032103)
 * As per your guidance, I will do all the necessary steps.
    I selected the option:“
   CF-Connecting-IP” HTTP header to get a visitor IP. I will also whitelist the 
   site’s IP address in Cloudflare.
 * But still, I face the same issue.
 * Please help me to solve the issue.

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

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

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [API error](https://wordpress.org/support/topic-tag/api-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [eprince](https://wordpress.org/support/users/eprince/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/api-error-63/#post-15032103)
 * Status: resolved