Skip to main content

Reference Guide

Classes

Client

Client is the class that offers functions for validating Friendly Captcha responses generated by the Friendly Captcha widget.

ErrorCodes

ErrorCodes contains constants representing various error codes used in the Friendly Captcha SDK.

Options

Options manages configuration parameters used by the Client . Parameters are set via a fluent interface.

Example

Options opts = new Options()
.sitekey('FC0123456789ABCD')
.timeout(500);

System.debug(opts.sitekey());

VerifyResponse

Represents the data structure returned in the siteverify response from the Friendly Captcha API.

For more information, see the API response documentation.

VerifyResult

VerifyResult is a wrapper around the response of an /api/v2/captcha/siteverify request.

The main methods are shouldAccept and wasAbleToVerify . The first one you should use to determine if the user's request should be accepted; the second one to determine if the request was able to be verified. If that returns false, it means that there was an issue in the communication with the Friendly Captcha API, and you should log an error or notify your monitoring system.

Custom Objects

Config__mdt