Skip to content

Instantly share code, notes, and snippets.

Last active Feb 25, 2020
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($"{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