{"id":19023811,"url":"https://github.com/shinyscorpion/google_recaptcha","last_synced_at":"2025-06-13T13:34:52.295Z","repository":{"id":57502805,"uuid":"96527425","full_name":"shinyscorpion/google_recaptcha","owner":"shinyscorpion","description":"Google Recaptcha API Client for Elixir.","archived":false,"fork":false,"pushed_at":"2023-09-26T00:05:30.000Z","size":36,"stargazers_count":7,"open_issues_count":3,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T18:05:43.590Z","etag":null,"topics":["elixir","elixir-lang","google-recaptcha","hex","recaptcha"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinyscorpion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-07T10:20:47.000Z","updated_at":"2023-02-19T18:31:42.000Z","dependencies_parsed_at":"2024-11-08T20:38:32.337Z","dependency_job_id":null,"html_url":"https://github.com/shinyscorpion/google_recaptcha","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fgoogle_recaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fgoogle_recaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fgoogle_recaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fgoogle_recaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinyscorpion","download_url":"https://codeload.github.com/shinyscorpion/google_recaptcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250419464,"owners_count":21427604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","elixir-lang","google-recaptcha","hex","recaptcha"],"created_at":"2024-11-08T20:33:02.081Z","updated_at":"2025-04-23T10:45:15.926Z","avatar_url":"https://github.com/shinyscorpion.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Recaptcha\n\n[![Hex.pm](https://img.shields.io/hexpm/v/google_recaptcha.svg \"Hex\")](https://hex.pm/packages/google_recaptcha)\n[![Build Status](https://travis-ci.org/shinyscorpion/google_recaptcha.svg?branch=master)](https://travis-ci.org/shinyscorpion/google_recaptcha)\n[![Inline docs](http://inch-ci.org/github/shinyscorpion/google_recaptcha.svg?branch=master)](http://inch-ci.org/github/shinyscorpion/google_recaptcha)\n[![Coverage Status](https://coveralls.io/repos/github/shinyscorpion/google_recaptcha/badge.svg?branch=master)](https://coveralls.io/github/shinyscorpion/google_recaptcha?branch=master)\n\nGoogle Recaptcha API Client for Elixir.\n\n## Installation\n\n  1. Add `google_recaptcha` to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:google_recaptcha, \"~\u003e 0.2.0\"}]\n  end\n  ```\n\n  2. Run `mix deps.get` to install it.\n\n## Configuration\n\nAPI keys is needed to get the client working, you can generate [here](https://www.google.com/recaptcha/admin)\n\nAnd set the keys in your project configuration file:\n\n```elixir\nconfig :google_recaptcha,\n  api_url: \"https://www.google.com/recaptcha/api/siteverify\",\n  public_key: \"YOUR_PUBLIC_KEY\",\n  secret_key: \"YOUR_SECRET_KEY\",\n  enabled: true # You may set false for development\n```\n\n## Documentation\n\n  * https://hexdocs.pm/google_recaptcha/\n\n## Usage\n\nCheck if the captcha is valid, returns `:ok` when it is valid and `{:error, :error_type}` when something goes wrong:\n\n```elixir\n# When captcha is valid\niex\u003e GoogleRecaptcha.verify(captcha_response, client_ip_addres)\n...\u003e :ok\n\niex\u003e GoogleRecaptcha.verify(captcha_response, client_ip_addres)\n...\u003e {:error, :invalid_captcha}\n```\n\nCheck if the captcha is valid(check if the recaptcha is enabled), in this case returns bolean(any error will be return as `false`):\n\n```elixir\n# When captcha is valid\niex\u003e GoogleRecaptcha.valid?(captcha_response, client_ip_addres)\n...\u003e true\n\n# When captcha is disabled\niex\u003e GoogleRecaptcha.valid?(captcha_response, client_ip_addres)\n...\u003e true\n\n# Wrong captcha response\niex\u003e GoogleRecaptcha.valid?(wrong_captcha_response, client_ip_addres)\n...\u003e false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyscorpion%2Fgoogle_recaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinyscorpion%2Fgoogle_recaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyscorpion%2Fgoogle_recaptcha/lists"}