0

In my Google Gadget JavaScript, I have an URL to call from Google Apps Script.

function getFileId(postData) {
  var params = {};  
  var url = "https://script.google.com/a/macros/mycompany.com/s/AAABBBCCCDDEEE-FFF-GGG/exec";
  params[gadgets.io.RequestParameters.POST_DATA] = postData;
  params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
  params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
  gadgets.io.makeRequest(url , responseFileId, params);
};

So, when the function responseFileId() has returned obj.text, it actually goes to the mycompany.com login screen. That means it needs authentication from that Gadget I did. Didn't that Google Gadget hold my current domain's Google credential for running the Google Apps Script at "https://script.google.com/a/macros/mycompany.com/s/AAABBBCCCDDEEE-FFF-GGG/exec"?

I tried to run manually with Google Chrome browser, (https://script.google.com/a/macros/mycompany.com/s/AAABBBCCCDDEEE-FFF-GGG/exec) and it returns value without showing up the login screen...

Can someone tells what step has been missing for this? Has this something to do with Google OAuth?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
lannyboy
  • 617
  • 1
  • 10
  • 20

1 Answers1

0

Instead of doing this. I found a better idea => Using tags for remote website.

lannyboy
  • 617
  • 1
  • 10
  • 20