Search code examples
google-app-maker

How can I read a URL parameter in App Maker?


I want my application to be able to access url parameters, for example I’d like to be able to read “param” if someone navigates to my app using https://script.google.com/myapp?param=20.


Solution

  • You can use the google.script.url API from a client script (https://developers.google.com/apps-script/guides/html/reference/url).

    For example:

    google.script.url.getLocation(function(location) {
        alert(location.parameter.param);
    });