YouTube Data API v3 has not been used in project before or it is disabled. Enable it by visiting then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Apparently youtube has restricted your project fromusing the present API key
try regenerating new API key orcreate a new project and generate new key.
or
Your current api needs to be enabled first. Please check that also