You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After following the [instructions](https://developers.cloudflare.com/turnstile/get-started/) to get the client ready, and to generate your secret key, verifying the resposne on the server side is easy.
261
261
262
+
#### Client Side
263
+
264
+
More detailed instructions, including theming, can be found at
The *data-action* attribute can be verified later, on the server side.
280
+
281
+
#### Server Side
282
+
262
283
```csharp
263
284
// 1. Get the client IP address in your chosen web framework
264
285
stringclientIp=GetClientIpAddress();
@@ -284,9 +305,17 @@ else{
284
305
}
285
306
```
286
307
287
-
The full response, including `cdata`, can be fetched using`captchaApi.Response2Async(capthcaResponse, clientIp, secret)`.
308
+
The *hostname* and *action* can be (and **should** be) verified by passing the `hostname` and `action` arguments to`captchaApi.Verify2Async`, for example:
288
309
289
-
Furthermore, the *hostname* and *action* can be (and **should** be) verified by passing the `hostname` and `action` arguments to `captchaApi.Verify2Async`.
310
+
```csharp
311
+
varisValid=awaitcaptchaApi.Verify2Async(
312
+
capthcaResponse, clientIp, secret,
313
+
hostname: "expected.hostname",
314
+
action: "example-action",
315
+
);
316
+
```
317
+
318
+
The full response, including `cdata`, can be fetched using `captchaApi.Response2Async(capthcaResponse, clientIp, secret)`.
0 commit comments