Gorret Nabatanzi
Gorret Nabatanzi

Reputation: 1

Laravel API is returning a recaptcha bot verification response

I have an issue with my Laravel API where by out of the blue it started returning a bot verification response and seems I have failed to get over this problem.

API recaptcha bot verification response

I am testing a Laravel API in postman and other API testing tools and also trying to consume it in my mobile app with flutter but out of the blue, the API started returning a recaptcha bot verification response instead of the responses expected and I have totally failed to find a working solution for this and fortunately if I access the API with a browser it returns the data.

Could there be anyone with a solution?

Response returned:

\<!DOCTYPE html\>
\<html\>

\<head\>
\<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"\>
\<meta http-equiv="X-UA-Compatible" content="IE=edge"\>
\<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"\>
\<title\>Bot Verification\</title\>
\<script\>
function onSubmit() {
document.getElementById('lsrecaptcha-form').submit();
}

        var onloadCallback = function() {
            var cont = grecaptcha.render('recaptchadiv', {
                'sitekey': '6Le6iOkhAAAAAEy2qFOqtynWjdr3vsIScExJ_Maz',
                'callback': onSubmit,
                'size': 'invisible'
            });
            grecaptcha.execute(cont);
        };
    </script>enter image description here
        body {
            height: 100%;
        }
    
        .panel {
            padding: 30px;
            max-width: 425px;
            margin: 10% auto;
            box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2);
        }
    
        .title {
            font-size: 1.5em;
            font-weight: 100;
            margin-top: 10px;
            text-align: center;
        }
    
        .recaptcha-center {
            margin-top: 35px;
            margin-bottom: 20px;
            margin-left: 13%;
            margin-right: 13%;
            display: block;
        }
    </style>

\</head\>

\<body\>
\<div class="panel"\>
\<h3 class="title"\>Verifying that you are not a robot...\</h3\>
\<form id="lsrecaptcha-form" method="POST" action="/.lsrecap/recaptcha?"\>
\<div id="recaptchadiv" class="recaptcha-center"\>\</div\>
\</form\>
\</div\>
\<script src="https://www.recaptcha.net/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer\>
\</script\>`
\</body\>

\</html\>

Response returned

I tried consuming the API in postman and my mobile flutter app but it doesn't return the expected data instead it returns a recaptcha bot verification response.

Upvotes: 0

Views: 263

Answers (1)

Simanta Raj Sarma
Simanta Raj Sarma

Reputation: 1

postman proxy I had the issue, when tried starting the proxy, it's working

Upvotes: 0

Related Questions