Last active
March 24, 2021 21:58
-
-
Save viniciussanchez/7d18853f5f01e7b76fd349a0d5f0fa0c to your computer and use it in GitHub Desktop.
reCAPTCHA Validate Delphi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const | |
BASE_URL = 'https://www.google.com/recaptcha/api/siteverify'; | |
SECRET_KEY = 'MY SECRET KEY'; | |
var | |
LResponse: IResponse; | |
begin | |
LResponse := TRequest.New.BaseURL(BASE_URL) | |
.AddParam('secret', SECRET_KEY) | |
.AddParam('response', 'TOKEN GERADO PELO CAPTCHA') | |
.Post; | |
Result := LResponse.JSONValue.GetValue<boolean>('success'); | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment