The Pi Hole Stats widget docmentation here states that no API key is required to authenticate with the Pi Hole, however if the widget is loaded without an API key, it throws an error:
Warning: An API key is required, please see the docs
Using the widget with the apiKey directive set to the PiHole's API Key resolves this error.