CaptchaEx.Http.request_verification

You're seeing just the function request_verification, go back to CaptchaEx.Http module for more information.
Link to this function

request_verification(body, options \\ [])

View Source

Specs

request_verification(binary(), Keyword.t()) :: {:ok, map()} | {:error, [atom()]}

Sends an HTTP request to the reCAPTCHA version 2.0 API.

See the docs for more details on the API response.

Options

  • :timeout - the timeout for the request (defaults to 5000ms)

Examples

{:ok, %{
  "success" => success,
  "challenge_ts" => ts,
  "hostname" => host,
  "error-codes" => errors
}} = CaptchaEx.Http.request_verification(%{
  secret: "secret",
  response: "response",
  remote_ip: "remote_ip"
})