- Get Google reCaptcha Site Key And Secret Key
- Replace all
your_site_key
in html with your reCAPTCHA site key - Replace all
reCaptcha Secret Key
with your reCAPTCHA secret key
And run:
go get github.com/xinguang/go-recaptcha
cd $GOPATH/src/github.com/xinguang/go-recaptcha/example
ReCAPTCHA_SECRET="reCaptcha Secret Key" go run main.go
You can access the page from http://localhost:8002/ in your browser.
For more information on client side setup and other configuration options, check the official documentation.
* make sure 'localhost' is added to the list of domains allowed for the site registered at reCaptcha.