Executing Published Web App Without Login

46 views
Skip to first unread message

Nick Gover

unread,
Sep 9, 2019, 7:56:15 PM9/9/19
to google-apps-sc...@googlegroups.com
Perhaps I'm missing something or using this in a manner not intended but I can't get a web app I created to work.

I have an app that integrates with Webhooks  I'd like to use the URL of an Apps Script bound to a Google Sheet and published as a Web App for the Webhook.  See 3rd party app docs here

So the 3rd party service would POST to the Web App URL but it's not working.  When testing I notice it directs to login when requested.  I've tried publishing and setting to execute as myself (which I wouldn't think would require a login) or executing as a user.  I've allowed access as everyone.  Since this is just a Webhook it cannot login, am I just doing this wrong or missing some step?

publish-settings.jpg


Hoang Trinh

unread,
Sep 10, 2019, 12:36:44 AM9/10/19
to Google Apps Script Community
Can you try create new project version?

From my experience, updating exist project didn't work

Nick Gover

unread,
Sep 10, 2019, 9:00:01 AM9/10/19
to Google Apps Script Community
So, I've been trying to test that specific part out for a bit now.  So, when I Save and go to Publish, even if I don't update the version the changes appear to show, with both the "exec" and "dev" links.  




I went ahead and added a couple of changes (see below) and made sure to push a new version.

function doGet(e) {
  var params = JSON.stringify(e);
  console.log(params);
  return HtmlService.createHtmlOutput("here are the params: " + params);
}

function doPost(e) {
  var params = JSON.stringify(e);
  console.log(params);
  return HtmlService.createHtmlOutput("here are the params: " + params);
}

What's strange this time is that an option that wasn't there previously is.  The "Allow anyone, even anonymous" option.  Which I selected, so now I notice the URL changes, my domain is no longer included.


And it appears to not redirect to the login.  I'm still not sure exactly what triggered the change.
Reply all
Reply to author
Forward
0 new messages