• Resolved harpo1984

    (@harpo1984)


    Hi,

    First, amazing plugin, I only discovered it a couple of weeks ago and it has really helped boost two of my client sites.

    Everything is working fine with the plugin but I wanted to point out a potentially confusing error message that intermittently appears in the WP Admin area if you use a restricted YouTube API key.

    Here is a sample, message that appears at the top of a WP-Admin page:

    WP YouTube Lyte got the following error back from the YouTube API: forbidden (Mon, 31 May 2021 04:34:23 +0000)..

    A different message appears when you press the Test Key button in the plugin settings. I completely understand “why” the message appears (its intermittence seems to be related to cache clearing but maybe also a cron job?)

    Your API key might be OK, but the API call did not succeed or the response was not entirely expected. Technical error: forbidden

    I know the API key works fine and the plugin is performing as expected and these warnings are appearing because I have restricted the API usage to the site domain but they may potentially confuse some users.

    Might it be worth noting somewhere on the settings page or documentation what happens when a restricted API is used? It might also be useful to advise plugin users to set up a restricted HTTP Referrer list to protect API usage and API billing.

    Thanks again for a truly wonderful, easy to use and powerful plugin.

    Kind regards,

    Simon

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    the fact the API key does work for you but you still get that message is indeed very confusing, but I’m afraid the technical errors are straight from YouTube’s API and the relation between those messages and how restrictions work myself are somewhat unclear to me as well (which I why I personally don’t have any restrictions on my API key) … :-/

    Thread Starter harpo1984

    (@harpo1984)

    That’s no worries at all.

    When the restrictions are removed from the API the intermittent warnings don’t appear in the WP-Admin and when you “Test Key” you don’t get the other warning either.

    Turn the restrictions back on and the warnings resurface. Again, not an issue at all and I now understand the warnings are coming from the API rather than the plugin.

    Still might be worth adding a note somewhere in the plugins docs or settings that this may happen if you use a Restricted Key?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Something like

    In certain cases when adding restrictions the API key when tested might give technical warnings even if things are working correctly, make sure to check if new video’s are having the title displayed to confirm all is well.

    ?

    Thread Starter harpo1984

    (@harpo1984)

    That sounds great. (Thank you! I think this will benefit others)

    If it helps further, I’ve included a screenshot for you from the plugin settings showing the warning.

    I don’t have one from the WP Admin dashboard yet but I will upload that when I can showing the error (that is not actually an error)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, added the text to the FAQ just now, thanks for your help Simon! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Restricted API Dashboard Warning’ is closed to new replies.