Skip to content

Instantly share code, notes, and snippets.

@ekaraman89
Last active Feb 25, 2020
Embed
What would you like to do?
using System.Net;
public class GoogleCaptha
{
public static bool CheckCaptha(string response)
{
//var response = Request["g-recaptcha-response"];
string secretKey = "6LchxNsUAAAAAAM7bgBzOnwGmgVlUyppu6xNbcye";
var client = new WebClient();
var result = client.DownloadString($"https://www.google.com/recaptcha/api/siteverify?secret={secretKey}&response={response}");
dynamic obj = System.Web.Helpers.Json.Decode(result);
return obj.success;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment