• Resolved tubeornot2be

    (@tubeornot2be)


    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

    (@wfpeter)

    Hi @tubeornot2be, thanks for getting in touch!

    The 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

    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

    (@tubeornot2be)

    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 8 months, 1 week ago by tubeornot2be.
    Plugin Support wfpeter

    (@wfpeter)

    Hi @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.