Parameter passing to webapp on doGet(e)

google-apps-script

Solution

To add GET parameters to the end of a URL, you need to use a `?`.

So your URL should look something like this

http://script.[.......]/exec?variable=data&otherVariable=otherData

Also, be sure you publish your app to get this functionality. File > Manage Versions. Publish > Publish as Web App...

Problem

I'm trying to figure out how parameters in URL are passed to `doGet()` function. I tried to do `https://script.google.com/a/macros/[my domain].com/s/[some random string generated by GAS]` followed by `"&variable=data"` but it only gave me this error: "Sorry, the file you have requested does not exist." FYI, `https://script.google.com/a/macros/[my domain].com/s/[some random string generated by GAS]` works well without `"&variable=data".`

Original source