A Flask application demonstrating Byebot integration.
pip install -r requirements.txtEdit the values at the top of app.py:
BYEBOT_API_KEY = "your-api-key"
BYEBOT_SITE_KEY = "your-site-key"python app.pyVisit http://localhost:5000
-
Frontend: The widget is loaded via
<script src="https://challenge.byebot.de/ray/widget.js">. A div withclass="captcha-widget"anddata-sitekeyattribute renders the CAPTCHA. -
Token Submission: On verification, the widget adds a hidden
byebot-tokenfield to the form. -
Server Validation: POST the token to
/validate_token:
response = requests.post(
"https://challenge.byebot.de/validate_token",
json={"api_key": BYEBOT_API_KEY, "token": token}
)
# 200 OK = valid tokenapp.py- Flask server with form handling and token validationtemplates/index.html- Login form with CAPTCHA widgettemplates/result.html- Success page