recaptcha v2.3.0 Recaptcha

A module for verifying reCAPTCHA version 2.0 response strings.

See the documentation for more details.

Summary

Functions

Verifies a reCAPTCHA response string

Functions

verify(response, options \\ [])

Specs

verify(String.t, Keyword.t) ::
  {:ok, Recaptcha.Response.t} |
  {:error, [atom]}

Verifies a reCAPTCHA response string.

Options

  • :timeout - the timeout for the request (defaults to 5000ms)
  • :secret - the secret key used by recaptcha (defaults to the secret provided in application config)
  • :remote_ip - the IP address of the user (optional and not set by default)

Example

{:ok, api_response} = Recaptcha.verify(“response_string”)