Title: Cannot Generate API Key
Last modified: April 2, 2023

---

# Cannot Generate API Key

 *  Resolved [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * (@neotechnomad)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/cannot-generate-api-key/)
 * I cannot generate an API Key. I continually get this error:
 * =======
 * [02-Apr-2023 20:14:06 UTC] PHP Fatal error: Uncaught Error: Undefined constant“
   SUCURISCAN_API_URL” in /home/******/public_html/wp-content/plugins/sucuri-scanner/
   src/api.lib.php:232
   Stack trace:
 * **0 /home/\*\*\*\*\*\*/public_html/wp-content/plugins/sucuri-scanner/src/api.
   lib.php(342): SucuriScanAPI::apiCallWordpress()**
 * **1 /home/\*\*\*\*\*\*/public_html/wp-content/plugins/sucuri-scanner/src/settings-
   general.php(104): SucuriScanAPI::registerSite()**
 * **2 /home//public_html/wp-content/plugins/sucuri-scanner/src/pagehandler.php(
   133): sucuriscan_settings_general_apikey()**
 * **3 /home/\*\*\*\*\*\*/public_html/wp-includes/class-wp-hook.php(308): sucuriscan_settings_page()**
 * **4 /home/\*\*\*\*\*\*/public_html/wp-includes/class-wp-hook.php(332): WP_Hook-
   >apply_filters()**
 * **5 /home/\*\*\*\*\*\*/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()**
 * **6 /home/\*\*\*\*\*\*/public_html/wp-admin/admin.php(259): do_action()**
 * **7 {main}**
 * thrown in /home/******/public_html/wp-content/plugins/sucuri-scanner/src/api.
   lib.php on line 232
 * ============
 * Please assist.
    -  This topic was modified 3 years, 2 months ago by [neotechnomad](https://wordpress.org/support/users/neotechnomad/).
      Reason: spelling

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

 *  Thread Starter [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * (@neotechnomad)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/cannot-generate-api-key/#post-16639997)
 * Is there going to be a resolution to this error?
 *  Thread Starter [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * (@neotechnomad)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/cannot-generate-api-key/#post-16640493)
 * On my other website which has had the plugin activated for some time, the Audit
   Logs do not load in the dashboard.
 * [09-Apr-2023 22:04:07 UTC] PHP Fatal error: Uncaught Error: Undefined constant“
   SUCURISCAN_API_URL” in /home/**\*\*\*\*\***/public_html/wp-content/plugins/sucuri-
   scanner/src/api.lib.php:232
   Stack trace:
 * **0 /home/\*\*\*\*\*/public_html/wp-content/plugins/sucuri-scanner/src/api.lib.
   php(397): SucuriScanAPI::apiCallWordpress()**
 * **1 /home/****\*\*\*\*\***/public_html/wp-content/plugins/sucuri-scanner/src/
   auditlogs.lib.php(105): SucuriScanAPI::getAuditLogs()
 * **2 /home/****\*\*\*\*\***/public_html/wp-content/plugins/sucuri-scanner/src/
   pagehandler.php(199): SucuriScanAuditLogs::ajaxAuditLogs()
 * **3 /home/****\*\*\*\*\***/public_html/wp-includes/class-wp-hook.php(308): sucuriscan_ajax()
 * **4 /home/****\*\*\*\*\***/public_html/wp-includes/class-wp-hook.php(332): WP_Hook-
   >apply_filters()
 * **5 /home/****\*\*\*\*\***/public_html/wp-includes/plugin.php(517): WP_Hook->
   do_action()
 * **6 /home/****\*\*\*\*\***/public_html/wp-admin/admin-ajax.php(188): do_action()
 * **7 {main}**
 * thrown in /home/**\*\*\*\*\***/public_html/wp-content/plugins/sucuri-scanner/
   src/api.lib.php on line 232
 * Also this in Settings > **API Service Communication**:
 * “SUCURI: The status of the API service could not be enabled because the required
   SUCURISCAN_API_URL configuration was not found.”
 * “API Service Communication — Disabled — Service API URL not set. To enable the
   API service, add your API service URL as the SUCURISCAN_API_URL constant value
   to the main configuration file (wp-config.php).”
 * What is the “API service URL as the SUCURISCAN_API_URL constant value to the 
   main configuration file” that I have to add??
    -  This reply was modified 3 years, 2 months ago by [neotechnomad](https://wordpress.org/support/users/neotechnomad/).

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

The topic ‘Cannot Generate API Key’ is closed to new replies.

 * ![](https://ps.w.org/sucuri-scanner/assets/icon-256x256.png?rev=2875755)
 * [Sucuri Security - Auditing, Malware Scanner and Security Hardening](https://wordpress.org/plugins/sucuri-scanner/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sucuri-scanner/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sucuri-scanner/)
 * [Active Topics](https://wordpress.org/support/plugin/sucuri-scanner/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sucuri-scanner/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sucuri-scanner/reviews/)

## Tags

 * [api key](https://wordpress.org/support/topic-tag/api-key/)
 * [generate](https://wordpress.org/support/topic-tag/generate/)
 * [sucuri](https://wordpress.org/support/topic-tag/sucuri/)

 * 2 replies
 * 4 participants
 * Last reply from: [neotechnomad](https://wordpress.org/support/users/neotechnomad/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/cannot-generate-api-key/#post-16640493)
 * Status: resolved