PHP到Google WebApp返回“<H1>暂时移动</ H1>文档已移动”

Does anyone know how to call a web app written in Google AppScript from PHP?

I've published my app to run as me and made it available to "everyone". The test url looks like this:

https://script.google.com/macros/s/xXxXxX/dev?Jobno=11&Pickupfrom=Aa&Deliverto=bb&Readyby=22&Deliverby=33

This link appends a new record into a google spreadsheet. The link only works if I submit it manually in a browser that is logged in to Google. If I log out of google it forwards me to a login page. This makes no sense to me. I don't understand why it's forcing authentication.

Any ideas?

Sounds like it has something to do with how it's published. Republish and change "Who has access to the app" to "Anyone, even anonymous" and you should resolve the problem.

Edit: also remember to save a new version before publishing

You should use the "exec" version of your app, not the "dev" one.

And, as mentioned in the other answer, don't forget to save a version and update your deployment with this latest version.

The "dev" version is only used for test and is only accessible by the script editors when they are logged in.

Your url should look like this :

https://script.google.com/macros/s/xXxXxX/exec?Jobno=11&Pickupfrom=Aa&Deliverto=bb&Readyby=22&Deliverby=33

The described behaviour is a feature:

https://developers.google.com/apps-script/guides/content#redirects

Redirects

For security reasons, content returned by the Content service isn't served from script.google.com, but instead redirected to a one-time URL at script.googleusercontent.com. This means that if you use the Content service to return data to another application, you must ensure that the HTTP client is configured to follow redirects. For example, in the cURL command line utility, add the flag -L. Check the documentation for your HTTP client for more information on how to enable this behavior.