One of two things is probably at work here:
- You are authenticating with the account which grants access to the CMS, but the
CONTENT_OWNER_ID you provided in your youtube.channels().list() method is incorrect. - You are providing the correct
CONTENT_OWNER_ID, but authenticating with the wrong account.
Case 1
You may simply need to include the correct CONTENT_OWNER_ID for the onBehalfOfContentOwner parameter in your youtube.channels().list() method (although, you may have left this blank in your post for privacy).
To double-check, you can find the value for CONTENT_OWNER_ID by invoking the API through this form. Make sure that you are authenticated correctly (ie., using the account with access to the CMS you want), and you'll receive a JSON response, something like this:
{ "kind": "youtubePartner#contentOwnerList", "items": [ { "kind": "youtubePartner#contentOwner", "id": CONTENT_OWNER_ID, "displayName": DISPLAY_NAME etc. } ] }
Simply include whatever CONTENT_OWNER_ID you want from this response in your channels().list() method (making sure, again, that you are properly authenticated), and voila.
Case 2
If that doesn't solve your problem, then you may be providing the correct CONTENT_OWNER_ID, but you are authenticating with the wrong account.
Before running your script again, double-check that you delete the file containing your temporary access token (it will have a filename like "YOUR_FILENAME-oauth2.json"). Then, run your script again; making sure that, when prompted to select an account for authentication, you select the one that corresponds with the CONTENT_OWNER_ID you set.
tl:dr;
Basically, there must be agreement between the account with which you authenticate, and the CONTENT_OWNER_ID you provide.
Finally, you do not need an API key to invoke the API in this way; you either need an API key or a properly-authenticated OAuth 2.0 access token. Here are the docs.