Title: Problems getting API key
Last modified: August 22, 2016

---

# Problems getting API key

 *  [Nora McDougall](https://wordpress.org/support/users/nora-mcdougall/)
 * (@nora-mcdougall)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-getting-api-key/)
 * You guys are amazing at having someone here checking this forum. I will be posting
   about it on my Facebook page!
 * Anyway, I was working with a client by webinar today, and she is having a problem
   getting the API key. So, we followed the usual instructions and went to save 
   the options, but we received an error I haven’t seen before, “Your options have
   been saved, but we encountered a problem. You left your API key blank, so we 
   tried to get you a free API key from the Wordfence servers. However, we encountered
   a problem fetching the free key. We received an error response when trying to
   contact the WordFence scanning servers using PHP’s file_get_contents function.…”
   I have other clients on this web host who have not had this issue. Is it possibly
   a PHP version issue?
    Thanks!
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

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

 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-getting-api-key/#post-5941830)
 * Could be. We user cUrl and fall back to file_get (I think).
 * Can you check the php.ini file and see if so allow_url_fopen is set to on?
 * tim
 *  [ArditBrame](https://wordpress.org/support/users/arditbrame/)
 * (@arditbrame)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-getting-api-key/#post-5942083)
 * I have the same problem
 * “Your options have been saved, but we encountered a problem. You left your API
   key blank, so we tried to get you a free API key from the Wordfence servers. 
   However we encountered a problem fetching the free key: We received an error 
   response when trying to contact the Wordfence scanning servers. The HTTP status
   code was [0] and the curl error number was [7]”
 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/problems-getting-api-key/#post-5942086)
 * [@ardit](https://wordpress.org/support/users/ardit/) Did you check the solution
   provided? In the future make sure and open your own post so we can better track
   incidents.
 * Thanks!
 * tim
 *  [ArditBrame](https://wordpress.org/support/users/arditbrame/)
 * (@arditbrame)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-getting-api-key/#post-5942107)
 * Hi Tim. Thank you for the reply.
    Yes i followed the instructions but i still
   havent activated Wordfence.
 * Thank you.
 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/problems-getting-api-key/#post-5942117)
 * When you run the connectivity test (bottom pf WF options page) what does it say?
 * tim

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

The topic ‘Problems getting API key’ 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 key](https://wordpress.org/support/topic-tag/api-key/)

 * 5 replies
 * 3 participants
 * Last reply from: [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/problems-getting-api-key/#post-5942117)
 * Status: not resolved