Return Values from API call

I've spent the afternoon turning an Appscript Task into a published webapp and converted the call to use a webhook with return values instead of an appscript task with return values.

After much testing and wailing I have discovered that the Content Service which is used to return values back to the calling task is instead returning a url to where the returned values are!

Inspection of the Audit Logs for the task shows this line:

"Response": "<HTML>\n<HEAD>\n<TITLE>Moved Temporarily</TITLE>\n</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">\n<H1>Moved Temporarily</H1>\nThe document has moved <A HREF=\"https://script.googleusercontent.com/mac...etc

Looking up the Content Service docs, "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."

So...how do I make the webhook follow the redirect and grab the returned values?

0 0 57
0 REPLIES 0
Top Labels in this Space