Home Support Book Review Support Google Books API returning error code 403

  • This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago by Søren Skjold Andersen.
  • Author
  • #4257
    Søren Skjold Andersen

    I have WordPress version 4.9 and Book Review version 2.3.9, have created an API key with Google, and set it up with country code “Denmark” and the correct API key in the plugin.

    However on the Google API dashboard, every attempt to fetch book info results in an error code 403. That is not a very helpful error code, and I can’t seem to find any other place to look up a more specific error.

    Can you help?



    Can you try this in Chrome?

    First, open the DevTools, click on the Network tab, and then enter an ISBN as per usual and click the “Get Book Info” button. Filter on “admin-ajax” and click on the row that is making a request to get the book details (it will likely be the last one). Please take screenshots of both the Headers and Preview tabs. For example, here is the Preview tab for a request made on my site – https://cloudup.com/iEa5ppvb1Mv


    Søren Skjold Andersen

    Hi Donna

    Here’s a link with the two screenshots: https://www.dropbox.com/sh/3uqzq883fegebsb/AABZS7ByinXJDsWnRvGHRpnJa?dl=0

    If I copy the link in the “preview” tab, and put it straight into Chrome, then the book data are displayed to me in the browser.

    If I access the server which host the blog through ssh and visit the same URL through lynx, I get the chance to download a gz package with the info, no error 403.

    Søren Skjold Andersen

    I don’t know what is going on here, but I did some debugging and found an ugly solution to the problem.

    For some reason the URL that doesn’t work contains &, while the URL that works contain &

    Placing this replacement right before the call of the URL made it work:
    $url = str_replace(‘&’,’&’,$url);

    Maybe it has something to do with the settings on my server?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Book Review Support’ is closed to new topics and replies.