-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathIHCaptchaApi.cs
More file actions
18 lines (15 loc) · 810 Bytes
/
IHCaptchaApi.cs
File metadata and controls
18 lines (15 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright © Benjamin Abt 2020-2024, all rights reserved
using Refit;
namespace BenjaminAbt.HCaptcha;
/// <summary>
/// https://docs.hcaptcha.com/#server
/// </summary>
public interface IHCaptchaApi
{
/// <summary>
/// The endpoint expects a POST request with two parameters: your <paramref name="secret"/> API key and the h-captcha-response token (<paramref name="response"/> POSTed from your HTML page. You can optionally include the user's IP address (<paramref name="remoteIp"/>) as an additional security check. Do not send JSON data: the endpoint expects a standard URL-encoded form POST.
/// </summary>
[Post("/siteverify")]
Task<HCaptchaVerifyResponse?> Verify(string secret, string response, string? remoteIp = null,
CancellationToken cancellationToken = default);
}