I have a Google sheet with a Container-bound Script that makes Google Classroom API calls. I have added the spreadsheet now as a template for all teachers in my organization to copy the sheet and use it for themselves.
However, when teachers copy from the template, a new project is created in Google Console with no enabled APIs for that new project. They would have to go into the developer console and enable Classroom API for it to work....
No! This is way too much of a hassle for my fellow teachers! There has to be a better way. What am I doing wrong? How can my script keep the API calls enabled for all copies of the spreadsheet? Do I need to publish my script in a particular way or set up my project in a particular way? Whats the right approach here, guys?
This error when using the script in a copied spreadsheet. But of course, works fine in the original template file.
Google Classroom API has not been used in project project-id-xxxxxxxxxxxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/classroom.googleapis.com/overview?project=project-id-xxxxxxxxxxxxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.