Example Go application demonstrating Ray CAPTCHA integration.
go run main.goEdit the constants at the top of main.go:
const (
baseURL = "https://challenge.byebot.de" // Ray CAPTCHA server URL
apiKey = "" // Your API key
siteKey = "" // Your site key
port = "4343" // Server port
)- HTML form includes the captcha widget via
<div class="captcha-widget" data-sitekey="..."> - Widget script (
/ray/widget.js) renders the captcha and adds a hiddenbyebot-tokenfield on success - Form submits to
/submit, server validates token via POST to/validate_token - Server returns success/error result
main.go- HTTP server with form handling and token validationtemplates/index.html- Login form with captcha widget