API Reference
cap_server_api
Python wrapper for Cap CAPTCHA server API
Author(s): Cooper Dalrymple
- class cap_server_api.Server(instance: str, api_key: str)
Establish server API connection to Cap instance.
Create the server API connection.
- Parameters:
instance – The domain of the Cap server.
api_key – The API key to connect to the server. Must be generated within Cap dashboard.
- property about: dict
Get basic information from the server. Returns a dict with the keys “bun”, “ver” and “demo”.
- add_key(name: str, instrumentation: bool = True, blockAutomatedBrowsers: bool = True, corsOrigins: list | None = None) dict
Create a new key. Returns a dict with the same keys as
get_key()but also includes “secretKey”.- Parameters:
name – The name of the key.
instrumentation – Whether or not you would like to enable instrumentation challenges.
blockAutomatedBrowsers – Whether or not to attempt to block headless browsers.
corsOrigins – Only these origins will be able to request challenges for this key.
- delete_key(siteKey: str) dict
Delete a key by its “siteKey” value.
- Parameters:
siteKey – The site key of the key.