RecaptchaResponse

@Serializable
data class RecaptchaResponse(val success: Boolean, val errorCodes: List<String> = emptyList(), val hostname: String? = null, val challengeTs: String? = null)

Represents the JSON response from Google's reCAPTCHA verification endpoint.

Constructors

Link copied to clipboard
constructor(success: Boolean, errorCodes: List<String> = emptyList(), hostname: String? = null, challengeTs: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "challenge_ts")
val challengeTs: String?

the timestamp of the challenge in ISO 8601 format.

Link copied to clipboard
@SerialName(value = "error-codes")
val errorCodes: List<String>

error codes returned by the API, if any.

Link copied to clipboard

the hostname of the site where the reCAPTCHA was solved.

Link copied to clipboard

whether the reCAPTCHA token was valid.