Reputation: 567
I can execute this URL (which is a Google Apps Script) from the Browser:
My goal is to send a GET to pushingbox that will then send the https: Pushingbox seems to give the same results as cURL. So for simplification, here is what I get from cURL:
curl https://script.google.com/macros/s/AKfycbyiZfWd10mmuaKPBF4zMMV4WJl_ZmLFrzCJCC_xZmviu-6z4lBS/exec
<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://www.google.com/accounts/ServiceLogin? service=wise&passive=1209600&continue=https://script.google.com/macros/s/AKfycbyiZfWd10mmuaKPBF4zMMV4WJl_ZmLFrzCJCC_xZmviu-6z4lBS/exec&followup=https://script.google.com/macros/s/AKfycbyiZfWd10mmuaKPBF4zMMV4WJl_ZmLFrzCJCC_xZmviu-6z4lBS/exec">here</A>.
</BODY>
Why does it appear that when the HTTPS is sent from cURL it requires a login to run the Google Script? I put the Share on the Google Script to "even anonymous can edit"
Is there a way to get cURL (and hence pushingbox) to work?
Thank you very much for any help.
Upvotes: 3
Views: 3140
Reputation: 1879
Adding the -L flag to curl will instruct it to follow the redirect:
curl -X GET -L https://script.google.com/macros/s/AKfycbyiZfWd10mmuaKPBF4zMMV4WJl_ZmLFrzCJCC_xZmviu-6z4lBS/exec
Hope this helps!
Upvotes: 5