I would to create a script launched by a cron job that periodically store data about my channel in a file. Those data are retrieved via YouTube Analytics API (not the ordinary YouTube API).
How can i achieve this result? Are service access compatible with those API?
If this is just a once-off - for your account - running on a server/desktop that you trust, I think the best mechanism will be to:
If you are using Python - and have installed the Google API Python Client, the following code will do steps 2 - 4 for you (assuming you have already done step 1 and saved a client_secrets.json file):