from __future__ import annotations from fastapi import Header, HTTPException from backend import config async def verify_webhook_secret( x_telegram_bot_api_secret_token: str = Header(default=""), ) -> None: if x_telegram_bot_api_secret_token != config.WEBHOOK_SECRET: raise HTTPException(status_code=403, detail="Forbidden")