跳转至

Webhook Helpers API

Webhook 相关辅助函数与请求模型。

wechat_bot.webhook.create_webhook_app(bot: Bot, *, api_key: str | None = None, allow_get: bool = True) -> object

Create a FastAPI app exposing /healthz and /send.

wechat_bot.webhook.run_webhook_server(*, host: str = '127.0.0.1', port: int = 8787, account_id: str | None = None, state_dir: str | None = None, api_key: str | None = None, allow_get: bool = True, log_level: str = 'info', use_current_user: bool = True) -> None

Run webhook server and expose HTTP endpoints for sending text messages.

wechat_bot.webhook.WebhookSendRequest

Bases: BaseModel

Payload for POST /send.