From 668a21198d7dc8a5a406a04859f6d2f4c8d781cb Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:02:53 +0100 Subject: [PATCH] Implement webhook for user signup notifications Added webhook notification for user signup. --- backend/open_webui/routers/auths.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/open_webui/routers/auths.py b/backend/open_webui/routers/auths.py index 3d83dcaea6..e18c15a141 100644 --- a/backend/open_webui/routers/auths.py +++ b/backend/open_webui/routers/auths.py @@ -867,6 +867,18 @@ async def add_user( user.id, ) + if request.app.state.config.WEBHOOK_URL: + await post_webhook( + request.app.state.WEBUI_NAME, + request.app.state.config.WEBHOOK_URL, + WEBHOOK_MESSAGES.USER_SIGNUP(user.name), + { + "action": "signup", + "message": WEBHOOK_MESSAGES.USER_SIGNUP(user.name), + "user": user.model_dump_json(exclude_none=True), + }, + ) + token = create_token(data={"id": user.id}) return { "token": token,