Skip to content

Instantly share code, notes, and snippets.

@viniciussanchez
Last active March 24, 2021 21:58
Show Gist options
  • Save viniciussanchez/7d18853f5f01e7b76fd349a0d5f0fa0c to your computer and use it in GitHub Desktop.
Save viniciussanchez/7d18853f5f01e7b76fd349a0d5f0fa0c to your computer and use it in GitHub Desktop.
reCAPTCHA Validate Delphi
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