CaptchaEx (captcha_ex v0.1.0) View Source

A module for verifying reCAPTCHA version 2.0 response strings.

See the documentation for more details.

Link to this section Summary

Functions

Verifies a reCAPTCHA response string.

Link to this section Functions

Link to this function

verify(response, options \\ [])

View Source

Specs

verify(String.t(), Keyword.t()) ::
  {:ok, CaptchaEx.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)

Examples

{:ok, api_response} = CaptchaEx.verify("response_string")