Title: Wordfence API
Last modified: March 19, 2024

---

# Wordfence API

 *  Resolved [tubeornot2be](https://wordpress.org/support/users/tubeornot2be/)
 * (@tubeornot2be)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wordfence-api/)
 * Hello, I have multiple websites on my other account, sometimes they have connection
   issues so I created a script to repair them automatically. The issue is now I
   have to log into the wf every day and take a token to paste it so that the script
   would work. Is there a way for me to fetch my login token through a request on
   my script, also I would like to send a request for a scan through that script
   so that I don’t have to start scan manually, since the current ‘Once a day’ scan
   option crashes my server, since they all start at the same time. I would like
   to send a request for them to scan at different times.

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wordfence-api/#post-17511348)
 * Hi [@tubeornot2be](https://wordpress.org/support/users/tubeornot2be/), thanks
   for getting in touch!
 * The [Wordfence API](https://www.wordfence.com/help/advanced/wordfence-api/) currently
   can be used to import settings or add IPs to the allowlist, but doesn’t have 
   other endpoints for credentials.
 * In your **Wordfence > Tools > Diagnostics** page under “**Cron Jobs**“, you should
   see `wordfence_start_scheduled_scan` multiple times as the `wordfence_daily_cron`
   job adds them for future scans. As they run every 3 days on the free plugin, 
   you may have 2 or 3 scans scheduled at any one time. Scheduling is coordinated
   with our servers to avoid too many scans starting at the same time.
 * If cron jobs are overdue and are all starting at the same time for too many sites
   on the same server, slow performance can happen. Scheduling them yourself to 
   run every 1 or 5 minutes might help (recommended at the bottom of this page):
   [https://www.wordfence.com/help/scan/options/#advanced-options](https://www.wordfence.com/help/scan/options/#advanced-options)
 * Note that if there are no crons due in that 1-5 minute timescale nothing will
   run, so checking frequently won’t add extra load on the server.
 * Finally, ensure you’re not using the same free key on multiple sites, as they
   can be rate limited for making too many requests to our servers or schedule the
   exact same scan start times due to them being seen as the same single site.
 * Thanks,
   Peter.
 *  Thread Starter [tubeornot2be](https://wordpress.org/support/users/tubeornot2be/)
 * (@tubeornot2be)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wordfence-api/#post-17511593)
 * We have about 300 websites, it’s kind of hard to manage that manually, is it 
   possible to have multiple free keys on the same mail address? Will there be some
   kind of API update in the future where we can be more flexible with it?
    -  This reply was modified 2 years, 2 months ago by [tubeornot2be](https://wordpress.org/support/users/tubeornot2be/).
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wordfence-api/#post-17512021)
 * Hi [@tubeornot2be](https://wordpress.org/support/users/tubeornot2be/),
 * Yes, there’s no limit to how many free keys a single email address can register.
   Any sites installed before the end of 2022 that have auto-generated keys will
   continue to work without a requirement to change them.
 * I have no news on potential schedules for the bulk generation of site keys, or
   whether Wordfence API enhancements are planned at all. To ensure a request is
   seen by the team, you can contact **feedback @ wordfence . com** to highlight
   your use-case.
 * Thanks again,
   Peter.

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

The topic ‘Wordfence API’ 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](https://wordpress.org/support/topic-tag/api/)
 * [scan](https://wordpress.org/support/topic-tag/scan/)
 * [token](https://wordpress.org/support/topic-tag/token/)

 * 3 replies
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/wordfence-api/#post-17512021)
 * Status: resolved