Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the new Google Drive Resource Key Requirements Effect Google Apps access to spreadsheets

I have a number of Google Apps Script Web Apps that allow anyone with a link to the apps script to read and update some of my google drive spreadsheets.

Inside the app I gain access to the spreadsheets via

SpreadsheetApp.openByUrl(spreadsheet_url)

With the upcoming changes to Google Drive that require a resource key to access files:

Question 1: do I need to change the URL within each of the the Google Apps Scripts to continue to get access , and if so, how do I get the new URL?

Question 2: For users to access the Web App GAS, do I need to update the link to the Web App GAS with a new URL, and if so, how do I get that new URL for the Web App itself.

like image 237
Chris Avatar asked Dec 06 '25 20:12

Chris


2 Answers

As stated in the update feed, this security update is optional

Follow the instructions and you will have the option to remove this security update - either for all files or the specific ones you are accessing within your WebApps.

enter image description here

Sidenote:

As for updating the link to the WebApp URL - if you perform a change to your WebApp, you need to deploy it as a new version.

  • If you use the legacy editor - the WebApp URL will remain the same.
  • If you use the new editor - the WebApp URL wil cahnge eacht ime you deploy it as a new version.
like image 168
ziganotschka Avatar answered Dec 11 '25 21:12

ziganotschka


As was mentioned on the previous answer, please bear in mind that you might opt-out of the Google Drive file links update.

Regarding code, the updates blog only mention changes that might be required when using the Google Drive API, not when using the Google Apps Script Workspace Services, the Google Apps Script release notes doesn't include anything related to this. Anyway, to feel "safer", you might replace openByUrl by openById as the files ids will not be changed.

Regarding the Web App URL, it is not a Google Drive file, so doesn't use the Google Drive sharing feature, so it will not change.

Resource

  • Update to some Google Drive file links, admin decision recommended before July 23, 2021
like image 45
Rubén Avatar answered Dec 11 '25 21:12

Rubén