Please open script.google.com.
Create a new project and rename it.
Paste the following code in the code.gs:
function doPost(e) {
var params = e.parameter;
var token = params.token;
var ip = params.ip;
var uri = 'https://www.google.com/recaptcha/api/siteverify';
var data = {
secret: 'YOUR_SECRET'_KEY,
response: token,
remoteip: ip
}
var option = {
method: 'post',
payload: data
};
var response = UrlFetchApp.fetch(uri, option);
return ContentService.createTextOutput(response).setMimeType(ContentService.MimeType.JSON);
}
Please fill in the secret key.
Then deployed as a web application, accessors: everyone
After the completion, there will be a URL, please copy and paste it in the html just now.