This is such a strange issue and there seems to be no documentation of it anywhere online.
Whenever I try to execute a script that requires authorization to access a
Make sure that you are using the right scope for this. To retrieve the information about a specific reporting job that has been scheduled for a channel or content owner, you must use the following authorization scopes:
https://www.googleapis.com/auth/yt-analytics.readonly
https://www.googleapis.com/auth/yt-analytics-monetary.readonly
Check this link for more information.