My webhook URI failed to verify. Here is the whole error message:
Error: Unacceptable status code 302 from server.
Request:
GET https://script.google.com/macros/s/AKfycbxzBVC_VK66FJycw5Xj8WXzLwvblzVfjuLDn2omWTCh9A-ho2DjRw0iiNxhMi7rHmmjmg/exec?challenge=wWcCJQ9ucOJSKkIoTgPrDfSlaV0lj8mfpvmnboSEjkE
Response:
HTTP/1.1 302 Found
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Content-Security-Policy: frame-ancestors 'self'
X-Content-Type-Options: nosniff
Content-Encoding: gzip
Transfer-Encoding: chunked
X-Http-Reason: Moved Temporarily
Server: GSE
X-Xss-Protection: 1; mode=block
Location: https://script.googleusercontent.com/macros/echo?user_content_key=rcDrZb2AhQkSO3xDADCP_OB3JPf9HTfUVTRqXniN9WIHo0CiW9u3or0pEAIeaLajs9fZ5eJ-G9Y2spa9Jc5N_uY7Z8PaNmTUOJmA1Yb3SEsKFZqtv3DaNYcMrmhZHmUMWojr9NvTBuBLhyHCd5hHazeV1IPNd4LqqkcI5IfhlrtlGssEWQWAK-1qY8QWOwk_VL8mXe9Jq0DM2cqnH2Dsl99pdKBw73fV8_nYwCxpSiGlrS8IuWKI0pXcmC-3_qHGl6xrbMsOj9IQsQx8yAYqxLX_ipCnnTUIyh7C3hycc7t7Zz8YAFfuN5QfuW_WBnEd&lib=MqYeaU5EGpgQmnADxgYeVYA3KyBJTF8GM
Pragma: no-cache
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Date: Thu, 11 Nov 2021 15:44:45 GMT
Access-Control-Allow-Origin: *
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-Type: text/html; charset=UTF-8
X-Frame-Options: SAMEORIGIN
Response Body (First 256 bytes):
'<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/macros/echo?user_content_key=rcDrZb2AhQkSO3xDADCP_OB3JPf9HTfUVTRq '
My google app script web app contains the following code:
function doGet(e) {
const challenge = e.parameter.challenge;
if (challenge) {
return ContentService.createTextOutput(challenge);
}
console.log(e.parameter);
}
function doPost(e) {
console.log(e.postData.contents);
console.log(e.parameters);
// check which file was changed
}
"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."
It seems that dropbox verification process does not "follow redirects", which resulted the error. Is there a workaround for this?