AppScript UrlFetchApp.fetch() not working for WebApp accessible only by domain users The Next CEO of Stack OverflowHow to use UrlFetchApp with credentials? Google ScriptsFailure in Fetching Google Script's URLFetch JSON object from Google WebApp from another Google WebAppTransferring data to GAS via doPost does'nt workBounded appscript to google sheet is not working after being shared with java drive SDK v3Google Suite App Script Email Sending LimitRemote request and oauth for Google Apps Script webappG Suite Emails Sent with Google Apps Script Are Not Delivered “Message Blocked”Gmailapp sendemail select different accountPost from Infusionsoft to spreadsheet. Google WebApp permission settings
Why did early computer designers eschew integers?
Can a PhD from a non-TU9 German university become a professor in a TU9 university?
Is it okay to majorly distort historical facts while writing a fiction story?
My boss doesn't want me to have a side project
Is it "common practice in Fourier transform spectroscopy to multiply the measured interferogram by an apodizing function"? If so, why?
Car headlights in a world without electricity
Does int main() need a declaration on C++?
Is a linearly independent set whose span is dense a Schauder basis?
Strange use of "whether ... than ..." in official text
Was the Stack Exchange "Happy April Fools" page fitting with the 90s code?
Find the majority element, which appears more than half the time
Is there a rule of thumb for determining the amount one should accept for a settlement offer?
What difference does it make matching a word with/without a trailing whitespace?
MT "will strike" & LXX "will watch carefully" (Gen 3:15)?
Man transported from Alternate World into ours by a Neutrino Detector
Does the Idaho Potato Commission associate potato skins with healthy eating?
Could you use a laser beam as a modulated carrier wave for radio signal?
Incomplete cube
How dangerous is XSS
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?
Why does the freezing point matter when picking cooler ice packs?
Calculate the Mean mean of two numbers
Compensation for working overtime on Saturdays
AppScript UrlFetchApp.fetch() not working for WebApp accessible only by domain users
The Next CEO of Stack OverflowHow to use UrlFetchApp with credentials? Google ScriptsFailure in Fetching Google Script's URLFetch JSON object from Google WebApp from another Google WebAppTransferring data to GAS via doPost does'nt workBounded appscript to google sheet is not working after being shared with java drive SDK v3Google Suite App Script Email Sending LimitRemote request and oauth for Google Apps Script webappG Suite Emails Sent with Google Apps Script Are Not Delivered “Message Blocked”Gmailapp sendemail select different accountPost from Infusionsoft to spreadsheet. Google WebApp permission settings
I currently have an issue where I have:
Main account who owns an appscript deployed as a WebApp with excute set to "Me"
and acces set to "Anyone within @[mydomain].com" with doGet() and doPost()
methods.Secondary account who ownsappscript sending UrlFetchApp.fetch("mainAppURL").
Running the script in the secondary account returns the HTML of the Google Sign Page with response.getContentText() and does not run the doGet() method, but running the mainAppURL in the address bar seems to work.
Why is the script not creating a pop up to request the user to sign in?
google-apps-script web-applications google-oauth gsuite urlfetch
add a comment |
I currently have an issue where I have:
Main account who owns an appscript deployed as a WebApp with excute set to "Me"
and acces set to "Anyone within @[mydomain].com" with doGet() and doPost()
methods.Secondary account who ownsappscript sending UrlFetchApp.fetch("mainAppURL").
Running the script in the secondary account returns the HTML of the Google Sign Page with response.getContentText() and does not run the doGet() method, but running the mainAppURL in the address bar seems to work.
Why is the script not creating a pop up to request the user to sign in?
google-apps-script web-applications google-oauth gsuite urlfetch
Is the secondary account within your domain?
– TheMaster
Mar 8 at 21:02
Yes it is within the same domain! Currently trying to generate an oAuth token with the secondary user and passing the token within the header but getting a "401 unauthorized exception"
– Daniel
Mar 8 at 21:20
OMG THIS WAS IT !!!! I just ran A DriveApp function to enable the scope and it worked! Thank you!
– Daniel
Mar 8 at 21:28
@TheMaster You can repost my answer so that I can mark as solved, Thank you
– Daniel
Mar 8 at 21:38
Great! Your answer is enough. You can mark it as solved yourself.
– TheMaster
Mar 8 at 21:55
add a comment |
I currently have an issue where I have:
Main account who owns an appscript deployed as a WebApp with excute set to "Me"
and acces set to "Anyone within @[mydomain].com" with doGet() and doPost()
methods.Secondary account who ownsappscript sending UrlFetchApp.fetch("mainAppURL").
Running the script in the secondary account returns the HTML of the Google Sign Page with response.getContentText() and does not run the doGet() method, but running the mainAppURL in the address bar seems to work.
Why is the script not creating a pop up to request the user to sign in?
google-apps-script web-applications google-oauth gsuite urlfetch
I currently have an issue where I have:
Main account who owns an appscript deployed as a WebApp with excute set to "Me"
and acces set to "Anyone within @[mydomain].com" with doGet() and doPost()
methods.Secondary account who ownsappscript sending UrlFetchApp.fetch("mainAppURL").
Running the script in the secondary account returns the HTML of the Google Sign Page with response.getContentText() and does not run the doGet() method, but running the mainAppURL in the address bar seems to work.
Why is the script not creating a pop up to request the user to sign in?
google-apps-script web-applications google-oauth gsuite urlfetch
google-apps-script web-applications google-oauth gsuite urlfetch
edited Mar 8 at 21:02
TheMaster
10.6k3936
10.6k3936
asked Mar 8 at 19:33
DanielDaniel
112
112
Is the secondary account within your domain?
– TheMaster
Mar 8 at 21:02
Yes it is within the same domain! Currently trying to generate an oAuth token with the secondary user and passing the token within the header but getting a "401 unauthorized exception"
– Daniel
Mar 8 at 21:20
OMG THIS WAS IT !!!! I just ran A DriveApp function to enable the scope and it worked! Thank you!
– Daniel
Mar 8 at 21:28
@TheMaster You can repost my answer so that I can mark as solved, Thank you
– Daniel
Mar 8 at 21:38
Great! Your answer is enough. You can mark it as solved yourself.
– TheMaster
Mar 8 at 21:55
add a comment |
Is the secondary account within your domain?
– TheMaster
Mar 8 at 21:02
Yes it is within the same domain! Currently trying to generate an oAuth token with the secondary user and passing the token within the header but getting a "401 unauthorized exception"
– Daniel
Mar 8 at 21:20
OMG THIS WAS IT !!!! I just ran A DriveApp function to enable the scope and it worked! Thank you!
– Daniel
Mar 8 at 21:28
@TheMaster You can repost my answer so that I can mark as solved, Thank you
– Daniel
Mar 8 at 21:38
Great! Your answer is enough. You can mark it as solved yourself.
– TheMaster
Mar 8 at 21:55
Is the secondary account within your domain?
– TheMaster
Mar 8 at 21:02
Is the secondary account within your domain?
– TheMaster
Mar 8 at 21:02
Yes it is within the same domain! Currently trying to generate an oAuth token with the secondary user and passing the token within the header but getting a "401 unauthorized exception"
– Daniel
Mar 8 at 21:20
Yes it is within the same domain! Currently trying to generate an oAuth token with the secondary user and passing the token within the header but getting a "401 unauthorized exception"
– Daniel
Mar 8 at 21:20
OMG THIS WAS IT !!!! I just ran A DriveApp function to enable the scope and it worked! Thank you!
– Daniel
Mar 8 at 21:28
OMG THIS WAS IT !!!! I just ran A DriveApp function to enable the scope and it worked! Thank you!
– Daniel
Mar 8 at 21:28
@TheMaster You can repost my answer so that I can mark as solved, Thank you
– Daniel
Mar 8 at 21:38
@TheMaster You can repost my answer so that I can mark as solved, Thank you
– Daniel
Mar 8 at 21:38
Great! Your answer is enough. You can mark it as solved yourself.
– TheMaster
Mar 8 at 21:55
Great! Your answer is enough. You can mark it as solved yourself.
– TheMaster
Mar 8 at 21:55
add a comment |
1 Answer
1
active
oldest
votes
As @TheMaster said, the driveApp scope should be in the project properties (running a driveApp command will run the authorization) so that a script from a secondary account within the domain may perform a fetch request to as script owned by another account within that same domain.
add a comment |
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55069849%2fappscript-urlfetchapp-fetch-not-working-for-webapp-accessible-only-by-domain-u%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As @TheMaster said, the driveApp scope should be in the project properties (running a driveApp command will run the authorization) so that a script from a secondary account within the domain may perform a fetch request to as script owned by another account within that same domain.
add a comment |
As @TheMaster said, the driveApp scope should be in the project properties (running a driveApp command will run the authorization) so that a script from a secondary account within the domain may perform a fetch request to as script owned by another account within that same domain.
add a comment |
As @TheMaster said, the driveApp scope should be in the project properties (running a driveApp command will run the authorization) so that a script from a secondary account within the domain may perform a fetch request to as script owned by another account within that same domain.
As @TheMaster said, the driveApp scope should be in the project properties (running a driveApp command will run the authorization) so that a script from a secondary account within the domain may perform a fetch request to as script owned by another account within that same domain.
answered Mar 8 at 21:36
DanielDaniel
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55069849%2fappscript-urlfetchapp-fetch-not-working-for-webapp-accessible-only-by-domain-u%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is the secondary account within your domain?
– TheMaster
Mar 8 at 21:02
Yes it is within the same domain! Currently trying to generate an oAuth token with the secondary user and passing the token within the header but getting a "401 unauthorized exception"
– Daniel
Mar 8 at 21:20
OMG THIS WAS IT !!!! I just ran A DriveApp function to enable the scope and it worked! Thank you!
– Daniel
Mar 8 at 21:28
@TheMaster You can repost my answer so that I can mark as solved, Thank you
– Daniel
Mar 8 at 21:38
Great! Your answer is enough. You can mark it as solved yourself.
– TheMaster
Mar 8 at 21:55