Published URL of Web App sometimes has domain name and sometimes it doesn't

29 views
Skip to first unread message

Alan Wells

unread,
Apr 17, 2019, 9:22:10 AM4/17/19
to Google Apps Script Community
A Web App that I'm using has provided two different links at different times.  Once with the domain name included, and once without the domain name included.


I have no idea why.  But I need to know if my code is using the correct url.  So, I guess I should search by ID only and not the entire url, or I the search could fail to find a match, when the url is actually correct.

Riël Notermans

unread,
Apr 17, 2019, 4:17:57 PM4/17/19
to Google Apps Script Community
It depends if you intent to run the script as the user opening it or as the script owner. I also have  a feeling that is is not very consistent, BUT you can use them to your advantage:

if you use the link with the domain name in it, then in case of a user being logged in with mutliple accounts will try to login with that domain default at first. PS: you can use any domain name (as long as users within that domain have access to run that URL).

Riël Notermans

Op woensdagen vrij • Zzapps B.V. • High Tech Campus 9, 5656 AE Eindhoven • T 040 711 41 94 • E ri...@zzapps.nl • www.zzapps.nl
WIJ MAKEN HET ONDENKBARE MOGELIJK


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/2a5fa23a-f525-45db-804e-b6f92ffe644f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alan Wells

unread,
Apr 17, 2019, 4:44:13 PM4/17/19
to google-apps-sc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages