API Key problems WP Stats and Akismet

  • Unknown's avatar

    Ok… I have searched the forums and found similar problems but not an exact match to my issue. So I am going to post a new topic to see if I can get this problem resolved. Apologies in advanced if this topic is an exact match of an earlier one.

    I have an externally hosted blog (www.thisurlnotfound.com). The site is hosted by 1and1.com. I am using WordPress 2.6.5 and it is working correctly (to my knowledge).

    I regestered with WordPress today at 12:46PM EST and got an API Key. I did NOT register a xxxxxx.wordpress.com blog since I have my own. I just applied for a username.

    I put the API Key in the stats file as follows: $stats_wpcom_api_key = ‘xxxxxxxxxxxxx’; Obviously the x’s are my API Key.

    When I activate the plugin and goto the WordPress.com Stats page I get the following error: “[red box]Error from last API Key attempt: Missing API Key[/redbox] The WordPress.com Stats Plugin is not working because it needs to be linked to a WordPress.com account. An API Key is present in the source code but it did not work.”

    I am wondering since the key is brand new, maybe there is a period of time where it has not been fully registered with WordPress servers yet? For what it is worth, Akismet is not working either, however it does not give me an error message, so it is not as helpful.

    Thanks in advance, and apologies if this has been addressed somewhere else, I could not find a post with this exact problem.

  • Unknown's avatar

    Figured it out… I should not have put the key in the php code manually.

  • Unknown's avatar

    then where do you put it? i am still looking for some sort of configuration page but the only place i can find to put it is in the code?

  • Unknown's avatar

    Hello Witcompe, I am having the same problem, do you think you could clarify where you copied the key in the php code manually? THank you!

  • Unknown's avatar

    For WP Stats, when you activate the plugin you will see a red bar come up that says the plugin NEEDS YOUR ATTENTION, click on the hyper link on this line (I think is says WP STATS..) then it will pop up a window where you can enter the API code and associate the blog to your api account.

    Don’t hard code the API, it won’t work.

  • Unknown's avatar

    What should the following line of code look like? I am having the same issue I think.

    // You can hardcode a WP.com API key here.
    $stats_wpcom_api_key = ‘xxxxxxxxx’;

    The exact error from WP is…

    WordPress.com Stats
    Error from last API Key attempt:

    Missing API Key

    The WordPress.com Stats Plugin is not working because it needs to be linked to a WordPress.com account.

    An API Key is present in the source code but it did not work.

    Any insight would be greatly appreciated. Thanks.

  • Unknown's avatar
  • Unknown's avatar

    With API issues, it is best to contact staff here at wordpress.com directly at http://support.wordpress.com/contact/ .

    Include all details including the account name you are using, the full URL of the blog you are using Akismet or the stats plugin on

  • Unknown's avatar

    @momentsofmagic & everyone else
    Your solution actually worked, I had hell figuring this one out.
    Tried hardcoding a bunch of times and even re-installing.
    The only solution is following the link in the red box when you install.

  • Unknown's avatar

    Same here…. The only solution is following the link in the red box when you install. It worked for me but still problems with askimet stats

  • Unknown's avatar

    Also when you follow the red box you have the chance to associate your site to your wordpress account (that you opened just to get an API code) creating a “primary blog”

  • The topic ‘API Key problems WP Stats and Akismet’ is closed to new replies.