Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameter passing to webapp on doGet(e)

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".

like image 814
user2045225 Avatar asked Nov 21 '25 19:11

user2045225


1 Answers

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...

like image 70
Phil Bozak Avatar answered Nov 24 '25 11:11

Phil Bozak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!