google-apps-scriptgoogle-sheetsweb-applicationsquery-stringurl-parameters

Why can't I add parameters to my Google Script - Web App?


I created a Google Spreadsheet and created a bound Google Script (Tools > Script Editor) and then published as a Web App.

The docs (https://developers.google.com/apps-script/guides/web) say that I can add parameters to my script url however they don't work and just display a Google error page. The only parameter that works is prefix

Example of a parameter(error): https://script.google.com/macros/s/AKfycbxCTsVDtE89J4FzV_mx-svHkGtRof7L3qg9iKtQgpGgcn6cbbI/exec?pid=1

Example of using prefix(works): https://script.google.com/macros/s/AKfycbxCTsVDtE89J4FzV_mx-svHkGtRof7L3qg9iKtQgpGgcn6cbbI/exec?prefix=testFunction

Example of a parameter with and the prefix parameter(error): https://script.google.com/macros/s/AKfycbxCTsVDtE89J4FzV_mx-svHkGtRof7L3qg9iKtQgpGgcn6cbbI/exec?pid=1&prefix=testFunction


Solution

  • It seems that there are reserved parameters and Google has stated they will not fix this. I can't find a list but I know these do not work: