Ah, too late three years later but as for others who is faced with this problem - nothing wrong with your code, you simply forgot to add credentials after OAuth authentication (https://developers.google.com/youtube/v3/guides/authentication). You need to implement your own concent as Web App when you need data like this. API key is not enough.