Google reCAPTCHA Verification Step guide

We can use google reCAPTCHA in many places.

  1. When logging in, we can add this verification to prevent others from repeatedly trying to log in to another person’s account, or using robots to help.
  2. If it’s just a page that uses a code to redeem points, we can use it to ensure the security of the code.
  3. You can also use it in other places where you don’t want people to repeatedly try operations, or to prevent robots.

I will tell you how to use this feature.
If you like it, please press like.

  1. Go to the Google reCAPTCHA website.

  2. You must have your own website hosting. If not, please go to to register for an account.

  3. Register a new website in (1), as shown in the figure below, select the V2 check box, and enter your domain (2) in the allowed domain.

    to be continued…

1 Like

After registration, you will have a key and a secret key. The key is used by the client and the secret key is used by the server.

1 Like

This is please go to the website editor.
Create an html file first (this file must be hosted in a domain allowed by (3).
Paste this code.

<!DOCTYPE html>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/style.css" rel="stylesheet" type="text/css" media="all">
    <script src="" type="text/javascript"></script>
    <script src="" async defer></script>
    <div class="g-recaptcha" data-sitekey="YOUR_KEY" data-theme="light" data-size="normal" data-callback="verifyCallback" data-expired-callback="expired" data-error-callback="error"></div>
      var uriIP = '';
      var uriGAS = ' GOOGLE_APP_SCRIPT_URL';
      var ip;
        .then(response => response.text())
        .then(result => {
          var resultArr = result.split('\n');
          for(var i = 0, len = resultArr.length; i < len; i++)	{
            var tempArr = resultArr[i].split('=');
            if(tempArr[0] == 'ip') {
              ip = tempArr[1];
        .catch(err => {
function verifyCallback(token) {
  var formData = new FormData();
  formData.append('token', token);
  formData.append('ip', ip);
  fetch(uriGAS, {
    method: "POST",
    body: formData
  }).then(response => response.json())
    .then(result => {
      if(result.success) {
      	post_thunkable('reCAPTCHA Verified successfully');
      } else {
    .catch(err => {
      function expired(ex) {
        post_thunkable('reCAPTCHA Verification program expired');
      function error(err) {
        post_thunkable('reCAPTCHA verification failed');
    function post_thunkable(text){

Please change YOUR_KEY to your key first.
You can change it after google ap script url. The client is roughly complete.

1 Like

Please open
Create a new project and rename it.
Paste the following code in the

function doPost(e) {

  var params = e.parameter;
  var token = params.token; 
  var ip = params.ip; 
  var uri = '';
  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.

1 Like

Finally, publish the webpage and fill in the webview.
To obtain status data, please use the “When a message is received” program block.

1 Like

This is a demonstration, please use the URL in it directly and use your own to improve user privacy.

1 Like