I use Trello REST API in my Google Apps Script (GAS).
Whenever I change a row in Google Spreadsheets, my GAS catches the event and post the data of the changed row to Trello via post or patch API.
cf. https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post
The problem is that sometimes API requests fails and returns HTML (not JSON) response. Especially this happens after I call many requests.
An example of response is as follows.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Human Verification</title>
<style>
body {
font-family: "Arial";
}
</style>
<script type="text/javascript">
window.awsWafCookieDomainList = [];
window.gokuProps = {
"key":"[[FILTERED]]",
"iv":"[[FILTERED]]",
"context":"[[FILTERED]]"
};
</script>
<script src="https://5648a54233c0.cee742fb.us-west-2.token.awswaf.com/5648a54233c0/946e166377e8/fcd518a0a514/challenge.js"></script>
<script src="https://5648a54233c0.cee742fb.us-west-2.captcha.awswaf.com/5648a54233c0/946e166377e8/fcd518a0a514/captcha.js"></script>
</head>
<body>
<div id="captcha-container"></div>
<script type="text/javascript">
window.addEventListener("load", function() {
const container = document.querySelector("#captcha-container");
CaptchaScript.renderCaptcha(container, async (voucher) => {
await ChallengeScript.submitCaptcha(voucher);
window.location.reload(true);
}
);
});
</script>
<noscript>
<h1>JavaScript is disabled</h1>
In order to continue, you need to verify that you're not a robot by solving a CAPTCHA puzzle.
The CAPTCHA puzzle requires JavaScript. Enable JavaScript and then reload the page.
</noscript>
</body>
</html>
It seems that Trello API uses AWS WAF CAPTCHA, but there is no way to solving puzzle via JSON REST API.
Is there any way to avoid such requirement of CAPTCHA?