diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9193f22..e4a396c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,39 @@
# LoginRadius Python SDK Change Log
+
+# Version 11.7.0
+
+**Release Date:** March 29, 2025
+
+## Enhancements
+
+We've introduced a brand-new set of Webhook APIs, designed with enhanced functionality and flexibility. These new APIs support advanced features including:
+
+- Custom header configuration
+- Query parameter support
+- Webhook authentication methods (Bearer Token and Basic Auth)
+- Support for a custom `Name` parameter to label each webhook subscription
+
+As part of this upgrade, the legacy Webhook APIs have been deprecated in favor of the new, more robust versions.
+
+## Newly Added APIs
+
+- `get_webhook_subscription_detail` – Retrieve detailed information about a specific webhook subscription
+- `create_webhook_subscription` – Create a new webhook subscription with advanced configuration options
+- `delete_webhook_subscription` – Remove an existing webhook subscription
+- `update_webhook_subscription` – Modify an existing webhook subscription
+- `list_all_webhooks` – Retrieve a list of all configured webhook subscriptions
+- `get_webhook_events` – Fetch available webhook events supported by the system
+
+## Deprecated APIs
+
+The following legacy APIs have been deprecated:
+
+- `web_hook_subscribe`
+- `webhook_test`
+- `web_hook_unsubscribe`
+- `get_web_hook_subscribed_u_r_ls`
+
# Version 11.6.0
Release on **July 16, 2024**
diff --git a/Demo/LoginRadius/api/account/account_api.py b/Demo/LoginRadius/api/account/account_api.py
index bf9a03a..3deda5b 100644
--- a/Demo/LoginRadius/api/account/account_api.py
+++ b/Demo/LoginRadius/api/account/account_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/account/role_api.py b/Demo/LoginRadius/api/account/role_api.py
index f469e0c..a1901bb 100644
--- a/Demo/LoginRadius/api/account/role_api.py
+++ b/Demo/LoginRadius/api/account/role_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/account/sott_api.py b/Demo/LoginRadius/api/account/sott_api.py
index 58c69d5..34bd244 100644
--- a/Demo/LoginRadius/api/account/sott_api.py
+++ b/Demo/LoginRadius/api/account/sott_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/advanced/configuration_api.py b/Demo/LoginRadius/api/advanced/configuration_api.py
index 4e380a4..aa9b5c0 100644
--- a/Demo/LoginRadius/api/advanced/configuration_api.py
+++ b/Demo/LoginRadius/api/advanced/configuration_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/advanced/consentmanagement_api.py b/Demo/LoginRadius/api/advanced/consentmanagement_api.py
index 039f3be..05ad5f7 100644
--- a/Demo/LoginRadius/api/advanced/consentmanagement_api.py
+++ b/Demo/LoginRadius/api/advanced/consentmanagement_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/advanced/customobject_api.py b/Demo/LoginRadius/api/advanced/customobject_api.py
index 8fbbe0e..3c756a1 100644
--- a/Demo/LoginRadius/api/advanced/customobject_api.py
+++ b/Demo/LoginRadius/api/advanced/customobject_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/advanced/multifactorauthentication_api.py b/Demo/LoginRadius/api/advanced/multifactorauthentication_api.py
index 1732728..a3e843e 100644
--- a/Demo/LoginRadius/api/advanced/multifactorauthentication_api.py
+++ b/Demo/LoginRadius/api/advanced/multifactorauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/advanced/reauthentication_api.py b/Demo/LoginRadius/api/advanced/reauthentication_api.py
index 5b8cd67..dc79882 100644
--- a/Demo/LoginRadius/api/advanced/reauthentication_api.py
+++ b/Demo/LoginRadius/api/advanced/reauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/advanced/webhook_api.py b/Demo/LoginRadius/api/advanced/webhook_api.py
index 42fc699..b45cf57 100644
--- a/Demo/LoginRadius/api/advanced/webhook_api.py
+++ b/Demo/LoginRadius/api/advanced/webhook_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
@@ -12,36 +12,35 @@ def __init__(self, lr_object):
"""
self._lr_object = lr_object
- def get_web_hook_subscribed_u_r_ls(self, event):
- """This API is used to fatch all the subscribed URLs, for particular event
+ def get_webhook_subscription_detail(self, hook_id):
+ """This API is used to get details of a webhook subscription by Id
Args:
- event: Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject
+ hook_id: Unique ID of the webhook
Returns:
- Response Containing List of Webhhook Data
+ Response containing Definition for Complete WebHook data
40.1
"""
- if(self._lr_object.is_null_or_whitespace(event)):
- raise Exception(self._lr_object.get_validation_message("event"))
+ if(self._lr_object.is_null_or_whitespace(hook_id)):
+ raise Exception(self._lr_object.get_validation_message("hook_id"))
query_parameters = {}
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- query_parameters["event"] = event
- resource_path = "api/v2/webhook"
+ resource_path = "v2/manage/webhooks/" + hook_id
return self._lr_object.execute("GET", resource_path, query_parameters, {})
- def web_hook_subscribe(self, web_hook_subscribe_model):
- """API can be used to configure a WebHook on your LoginRadius site. Webhooks also work on subscribe and notification model, subscribe your hook and get a notification. Equivalent to RESThook but these provide security on basis of signature and RESThook work on unique URL. Following are the events that are allowed by LoginRadius to trigger a WebHook service call.
+ def create_webhook_subscription(self, web_hook_subscribe_model):
+ """This API is used to create a new webhook subscription on your LoginRadius site.
Args:
web_hook_subscribe_model: Model Class containing Definition of payload for Webhook Subscribe API
Returns:
- Response containing Definition of Complete Validation data
+ Response containing Definition for Complete WebHook data
40.2
"""
if(web_hook_subscribe_model is None):
@@ -51,40 +50,80 @@ def web_hook_subscribe(self, web_hook_subscribe_model):
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- resource_path = "api/v2/webhook"
+ resource_path = "v2/manage/webhooks"
return self._lr_object.execute("POST", resource_path, query_parameters, web_hook_subscribe_model)
- def webhook_test(self):
- """API can be used to test a subscribed WebHook.
+ def delete_webhook_subscription(self, hook_id):
+ """This API is used to delete webhook subscription
+ Args:
+ hook_id: Unique ID of the webhook
+
Returns:
- Response containing Definition of Complete Validation data
+ Response containing Definition of Delete Request
40.3
"""
+ if(self._lr_object.is_null_or_whitespace(hook_id)):
+ raise Exception(self._lr_object.get_validation_message("hook_id"))
+
query_parameters = {}
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- resource_path = "api/v2/webhook/test"
- return self._lr_object.execute("GET", resource_path, query_parameters, {})
+ resource_path = "v2/manage/webhooks/" + hook_id
+ return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
- def web_hook_unsubscribe(self, web_hook_subscribe_model):
- """API can be used to unsubscribe a WebHook configured on your LoginRadius site.
+ def update_webhook_subscription(self, hook_id, web_hook_subscription_update_model):
+ """This API is used to update a webhook subscription
Args:
- web_hook_subscribe_model: Model Class containing Definition of payload for Webhook Subscribe API
+ hook_id: Unique ID of the webhook
+ web_hook_subscription_update_model: Model Class containing Definition for WebHookSubscriptionUpdateModel Property
Returns:
- Response containing Definition of Delete Request
+ Response containing Definition for Complete WebHook data
40.4
"""
- if(web_hook_subscribe_model is None):
- raise Exception(self._lr_object.get_validation_message("web_hook_subscribe_model"))
+
+ if(self._lr_object.is_null_or_whitespace(hook_id)):
+ raise Exception(self._lr_object.get_validation_message("hook_id"))
+ if(web_hook_subscription_update_model is None):
+ raise Exception(self._lr_object.get_validation_message("web_hook_subscription_update_model"))
+
+ query_parameters = {}
+ query_parameters["apikey"] = self._lr_object.get_api_key()
+ query_parameters["apisecret"] = self._lr_object.get_api_secret()
+
+ resource_path = "v2/manage/webhooks/" + hook_id
+ return self._lr_object.execute("PUT", resource_path, query_parameters, web_hook_subscription_update_model)
+
+ def list_all_webhooks(self):
+ """This API is used to get the list of all the webhooks
+
+ Returns:
+ Response Containing List of Webhhook Data
+ 40.5
+ """
+
+ query_parameters = {}
+ query_parameters["apikey"] = self._lr_object.get_api_key()
+ query_parameters["apisecret"] = self._lr_object.get_api_secret()
+
+ resource_path = "v2/manage/webhooks"
+ return self._lr_object.execute("GET", resource_path, query_parameters, {})
+
+ def get_webhook_events(self):
+ """This API is used to retrieve all the webhook events.
+
+ Returns:
+ Model Class containing Definition for WebHookEventModel Property
+ 40.6
+ """
query_parameters = {}
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- resource_path = "api/v2/webhook"
- return self._lr_object.execute("DELETE", resource_path, query_parameters, web_hook_subscribe_model)
+ resource_path = "v2/manage/webhooks/events"
+ return self._lr_object.execute("GET", resource_path, query_parameters, {})
diff --git a/Demo/LoginRadius/api/authentication/authentication_api.py b/Demo/LoginRadius/api/authentication/authentication_api.py
index 6a8a728..2492bf5 100644
--- a/Demo/LoginRadius/api/authentication/authentication_api.py
+++ b/Demo/LoginRadius/api/authentication/authentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/onetouchlogin_api.py b/Demo/LoginRadius/api/authentication/onetouchlogin_api.py
index fd94141..62b26c4 100644
--- a/Demo/LoginRadius/api/authentication/onetouchlogin_api.py
+++ b/Demo/LoginRadius/api/authentication/onetouchlogin_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/passwordlesslogin_api.py b/Demo/LoginRadius/api/authentication/passwordlesslogin_api.py
index 4d3f0c5..ecadf7f 100644
--- a/Demo/LoginRadius/api/authentication/passwordlesslogin_api.py
+++ b/Demo/LoginRadius/api/authentication/passwordlesslogin_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/phoneauthentication_api.py b/Demo/LoginRadius/api/authentication/phoneauthentication_api.py
index de8568f..9717cf7 100644
--- a/Demo/LoginRadius/api/authentication/phoneauthentication_api.py
+++ b/Demo/LoginRadius/api/authentication/phoneauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/pinauthentication_api.py b/Demo/LoginRadius/api/authentication/pinauthentication_api.py
index b04ce8f..f4a634c 100644
--- a/Demo/LoginRadius/api/authentication/pinauthentication_api.py
+++ b/Demo/LoginRadius/api/authentication/pinauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/riskbasedauthentication_api.py b/Demo/LoginRadius/api/authentication/riskbasedauthentication_api.py
index 5181f0d..0911203 100644
--- a/Demo/LoginRadius/api/authentication/riskbasedauthentication_api.py
+++ b/Demo/LoginRadius/api/authentication/riskbasedauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/slidingtoken_api.py b/Demo/LoginRadius/api/authentication/slidingtoken_api.py
index 1a5836c..ccdc347 100644
--- a/Demo/LoginRadius/api/authentication/slidingtoken_api.py
+++ b/Demo/LoginRadius/api/authentication/slidingtoken_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/authentication/smartlogin_api.py b/Demo/LoginRadius/api/authentication/smartlogin_api.py
index c9be3d4..c7b3c59 100644
--- a/Demo/LoginRadius/api/authentication/smartlogin_api.py
+++ b/Demo/LoginRadius/api/authentication/smartlogin_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/social/nativesocial_api.py b/Demo/LoginRadius/api/social/nativesocial_api.py
index e4dc078..4bae5d2 100644
--- a/Demo/LoginRadius/api/social/nativesocial_api.py
+++ b/Demo/LoginRadius/api/social/nativesocial_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/Demo/LoginRadius/api/social/social_api.py b/Demo/LoginRadius/api/social/social_api.py
index 30946d3..3dcede9 100644
--- a/Demo/LoginRadius/api/social/social_api.py
+++ b/Demo/LoginRadius/api/social/social_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/LICENCE b/LICENCE
index c3ac770..23a023a 100644
--- a/LICENCE
+++ b/LICENCE
@@ -1,4 +1,4 @@
-Copyright (c) 2022 LoginRadius Inc.
+Copyright (c) 2025 LoginRadius Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 5d10003..ec06336 100644
--- a/README.md
+++ b/README.md
@@ -29,13 +29,13 @@ You will need at least Python - 2.7 or greater. LoginRadius module utilizes the
Using pip
```py
- pip install loginradius-v2==11.6.0
+ pip install loginradius-v2==11.7.0
```
or with easy_install
```py
- easy_install loginradius-v2==11.6.0
+ easy_install loginradius-v2==11.7.0
```
### Install From Source
@@ -3907,70 +3907,124 @@ result = loginradius.native_social.get_access_token_by_google_auth_code(google_a
List of APIs in this Section:
-* POST : [Webhook Subscribe](#WebHookSubscribe-post-)
-* GET : [Webhook Subscribed URLs](#GetWebHookSubscribedURLs-get-)
-* GET : [Webhook Test](#WebhookTest-get-)
-* DELETE : [WebHook Unsubscribe](#WebHookUnsubscribe-delete-)
+* PUT : [Update Webhook Subscription](#UpdateWebhookSubscription-put-)
+* POST : [Create Webhook Subscription](#CreateWebhookSubscription-post-)
+* GET : [Get Webhook Subscription Detail](#GetWebhookSubscriptionDetail-get-)
+* GET : [List All Webhooks](#ListAllWebhooks-get-)
+* GET : [Get Webhook Events](#GetWebhookEvents-get-)
+* DELETE : [Delete Webhook Subscription](#DeleteWebhookSubscription-delete-)
-
Webhook Subscribe (POST)
+ Update Webhook Subscription (PUT)
- API can be used to configure a WebHook on your LoginRadius site. Webhooks also work on subscribe and notification model, subscribe your hook and get a notification. Equivalent to RESThook but these provide security on basis of signature and RESThook work on unique URL. Following are the events that are allowed by LoginRadius to trigger a WebHook service call. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-subscribe)
+ This API is used to update a webhook subscription [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/update-webhook-subscription/)
+
+ ```py
+
+hook_id = "" #Required
+web_hook_subscription_update_model = {
+ "Headers": {
+ "x-test-header": "qa"
+ },
+ "QueryParams": {
+ "apikey": "859faf40a7c54c209360b45376bf529f"
+ },
+ "Authentication": {
+ "AuthType": "Basic",
+ "BasicAuth": {
+ "Username": "lrqaadmin",
+ "Password": "ZBz6JcnZadxc2gB7sf5vby87zBIu6q"
+ }
+ }
+} #Required
+
+result = loginradius.web_hook.update_webhook_subscription(hook_id, web_hook_subscription_update_model)
+ ```
+
+
+
+
+ Create Webhook Subscription (POST)
+
+ This API is used to create a new webhook subscription on your LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/create-webhook-subscription/)
```py
web_hook_subscribe_model = {
-"event" : "",
-"targetUrl" : ""
+ "event" : "",
+ "name" : "",
+ "targetUrl" : "",
+ "Headers": {
+ "Custom-Header": "headerValue"
+ },
+ "QueryParams": {
+ "apikey": "yourApiKey"
+ },
+ "Authentication": {
+ "AuthType": "Basic",
+ "BasicAuth": {
+ "Username": "yourUsername",
+ "Password": "yourPassword"
+ }
+ }
} #Required
-result = loginradius.web_hook.web_hook_subscribe(web_hook_subscribe_model)
+result = loginradius.web_hook.create_webhook_subscription(web_hook_subscribe_model)
```
- Webhook Subscribed URLs (GET)
+ Get Webhook Subscription Detail (GET)
- This API is used to fatch all the subscribed URLs, for particular event [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-subscribed-urls)
+ This API is used to get details of a webhook subscription by Id [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/get-webhook-subscription-details/)
```py
-event = "" #Required
+hook_id = "" #Required
-result = loginradius.web_hook.get_web_hook_subscribed_u_r_ls(event)
+result = loginradius.web_hook.get_webhook_subscription_detail(hook_id)
```
- Webhook Test (GET)
+ List All Webhooks (GET)
- API can be used to test a subscribed WebHook. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-test)
+ This API is used to get the list of all the webhooks [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/list-all-webhooks/)
```py
-
-result = loginradius.web_hook.webhook_test()
+result = loginradius.web_hook.list_all_webhooks()
```
- WebHook Unsubscribe (DELETE)
+ Get Webhook Events (GET)
- API can be used to unsubscribe a WebHook configured on your LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-unsubscribe)
+ This API is used to retrieve all the webhook events. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/get-webhook-events/)
```py
-web_hook_subscribe_model = {
-"event" : "",
-"targetUrl" : ""
-} #Required
-result = loginradius.web_hook.web_hook_unsubscribe(web_hook_subscribe_model)
+result = loginradius.web_hook.get_webhook_events()
+ ```
+
+
+
+
+ Delete Webhook Subscription (DELETE)
+
+ This API is used to delete webhook subscription [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/delete-webhook-subscription/)
+
+ ```py
+
+hook_id = "" #Required
+
+result = loginradius.web_hook.delete_webhook_subscription(hook_id)
```
### SlidingToken API
diff --git a/demo/LoginRadius/exceptions.py b/demo/LoginRadius/exceptions.py
index acaf9e0..cd714b8 100644
--- a/demo/LoginRadius/exceptions.py
+++ b/demo/LoginRadius/exceptions.py
@@ -9,7 +9,7 @@
# premium or enterprise members only. #
# In which case, an exception will be raised. #
#################################################
-# Copyright 2019 LoginRadius Inc. #
+# Copyright 2025 LoginRadius Inc. #
# - www.LoginRadius.com #
#################################################
# This file is part of the LoginRadius SDK #
diff --git a/lib/LoginRadius/api/account/account_api.py b/lib/LoginRadius/api/account/account_api.py
index bf9a03a..3deda5b 100644
--- a/lib/LoginRadius/api/account/account_api.py
+++ b/lib/LoginRadius/api/account/account_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/account/role_api.py b/lib/LoginRadius/api/account/role_api.py
index f469e0c..a1901bb 100644
--- a/lib/LoginRadius/api/account/role_api.py
+++ b/lib/LoginRadius/api/account/role_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/account/sott_api.py b/lib/LoginRadius/api/account/sott_api.py
index 58c69d5..34bd244 100644
--- a/lib/LoginRadius/api/account/sott_api.py
+++ b/lib/LoginRadius/api/account/sott_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/advanced/configuration_api.py b/lib/LoginRadius/api/advanced/configuration_api.py
index 4e380a4..aa9b5c0 100644
--- a/lib/LoginRadius/api/advanced/configuration_api.py
+++ b/lib/LoginRadius/api/advanced/configuration_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/advanced/consentmanagement_api.py b/lib/LoginRadius/api/advanced/consentmanagement_api.py
index 039f3be..05ad5f7 100644
--- a/lib/LoginRadius/api/advanced/consentmanagement_api.py
+++ b/lib/LoginRadius/api/advanced/consentmanagement_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/advanced/customobject_api.py b/lib/LoginRadius/api/advanced/customobject_api.py
index 8fbbe0e..3c756a1 100644
--- a/lib/LoginRadius/api/advanced/customobject_api.py
+++ b/lib/LoginRadius/api/advanced/customobject_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/advanced/multifactorauthentication_api.py b/lib/LoginRadius/api/advanced/multifactorauthentication_api.py
index 1732728..a3e843e 100644
--- a/lib/LoginRadius/api/advanced/multifactorauthentication_api.py
+++ b/lib/LoginRadius/api/advanced/multifactorauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/advanced/reauthentication_api.py b/lib/LoginRadius/api/advanced/reauthentication_api.py
index 5b8cd67..dc79882 100644
--- a/lib/LoginRadius/api/advanced/reauthentication_api.py
+++ b/lib/LoginRadius/api/advanced/reauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/advanced/webhook_api.py b/lib/LoginRadius/api/advanced/webhook_api.py
index 42fc699..b45cf57 100644
--- a/lib/LoginRadius/api/advanced/webhook_api.py
+++ b/lib/LoginRadius/api/advanced/webhook_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
@@ -12,36 +12,35 @@ def __init__(self, lr_object):
"""
self._lr_object = lr_object
- def get_web_hook_subscribed_u_r_ls(self, event):
- """This API is used to fatch all the subscribed URLs, for particular event
+ def get_webhook_subscription_detail(self, hook_id):
+ """This API is used to get details of a webhook subscription by Id
Args:
- event: Allowed events: Login, Register, UpdateProfile, ResetPassword, ChangePassword, emailVerification, AddEmail, RemoveEmail, BlockAccount, DeleteAccount, SetUsername, AssignRoles, UnassignRoles, SetPassword, LinkAccount, UnlinkAccount, UpdatePhoneId, VerifyPhoneNumber, CreateCustomObject, UpdateCustomobject, DeleteCustomObject
+ hook_id: Unique ID of the webhook
Returns:
- Response Containing List of Webhhook Data
+ Response containing Definition for Complete WebHook data
40.1
"""
- if(self._lr_object.is_null_or_whitespace(event)):
- raise Exception(self._lr_object.get_validation_message("event"))
+ if(self._lr_object.is_null_or_whitespace(hook_id)):
+ raise Exception(self._lr_object.get_validation_message("hook_id"))
query_parameters = {}
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- query_parameters["event"] = event
- resource_path = "api/v2/webhook"
+ resource_path = "v2/manage/webhooks/" + hook_id
return self._lr_object.execute("GET", resource_path, query_parameters, {})
- def web_hook_subscribe(self, web_hook_subscribe_model):
- """API can be used to configure a WebHook on your LoginRadius site. Webhooks also work on subscribe and notification model, subscribe your hook and get a notification. Equivalent to RESThook but these provide security on basis of signature and RESThook work on unique URL. Following are the events that are allowed by LoginRadius to trigger a WebHook service call.
+ def create_webhook_subscription(self, web_hook_subscribe_model):
+ """This API is used to create a new webhook subscription on your LoginRadius site.
Args:
web_hook_subscribe_model: Model Class containing Definition of payload for Webhook Subscribe API
Returns:
- Response containing Definition of Complete Validation data
+ Response containing Definition for Complete WebHook data
40.2
"""
if(web_hook_subscribe_model is None):
@@ -51,40 +50,80 @@ def web_hook_subscribe(self, web_hook_subscribe_model):
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- resource_path = "api/v2/webhook"
+ resource_path = "v2/manage/webhooks"
return self._lr_object.execute("POST", resource_path, query_parameters, web_hook_subscribe_model)
- def webhook_test(self):
- """API can be used to test a subscribed WebHook.
+ def delete_webhook_subscription(self, hook_id):
+ """This API is used to delete webhook subscription
+ Args:
+ hook_id: Unique ID of the webhook
+
Returns:
- Response containing Definition of Complete Validation data
+ Response containing Definition of Delete Request
40.3
"""
+ if(self._lr_object.is_null_or_whitespace(hook_id)):
+ raise Exception(self._lr_object.get_validation_message("hook_id"))
+
query_parameters = {}
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- resource_path = "api/v2/webhook/test"
- return self._lr_object.execute("GET", resource_path, query_parameters, {})
+ resource_path = "v2/manage/webhooks/" + hook_id
+ return self._lr_object.execute("DELETE", resource_path, query_parameters, {})
- def web_hook_unsubscribe(self, web_hook_subscribe_model):
- """API can be used to unsubscribe a WebHook configured on your LoginRadius site.
+ def update_webhook_subscription(self, hook_id, web_hook_subscription_update_model):
+ """This API is used to update a webhook subscription
Args:
- web_hook_subscribe_model: Model Class containing Definition of payload for Webhook Subscribe API
+ hook_id: Unique ID of the webhook
+ web_hook_subscription_update_model: Model Class containing Definition for WebHookSubscriptionUpdateModel Property
Returns:
- Response containing Definition of Delete Request
+ Response containing Definition for Complete WebHook data
40.4
"""
- if(web_hook_subscribe_model is None):
- raise Exception(self._lr_object.get_validation_message("web_hook_subscribe_model"))
+
+ if(self._lr_object.is_null_or_whitespace(hook_id)):
+ raise Exception(self._lr_object.get_validation_message("hook_id"))
+ if(web_hook_subscription_update_model is None):
+ raise Exception(self._lr_object.get_validation_message("web_hook_subscription_update_model"))
+
+ query_parameters = {}
+ query_parameters["apikey"] = self._lr_object.get_api_key()
+ query_parameters["apisecret"] = self._lr_object.get_api_secret()
+
+ resource_path = "v2/manage/webhooks/" + hook_id
+ return self._lr_object.execute("PUT", resource_path, query_parameters, web_hook_subscription_update_model)
+
+ def list_all_webhooks(self):
+ """This API is used to get the list of all the webhooks
+
+ Returns:
+ Response Containing List of Webhhook Data
+ 40.5
+ """
+
+ query_parameters = {}
+ query_parameters["apikey"] = self._lr_object.get_api_key()
+ query_parameters["apisecret"] = self._lr_object.get_api_secret()
+
+ resource_path = "v2/manage/webhooks"
+ return self._lr_object.execute("GET", resource_path, query_parameters, {})
+
+ def get_webhook_events(self):
+ """This API is used to retrieve all the webhook events.
+
+ Returns:
+ Model Class containing Definition for WebHookEventModel Property
+ 40.6
+ """
query_parameters = {}
query_parameters["apikey"] = self._lr_object.get_api_key()
query_parameters["apisecret"] = self._lr_object.get_api_secret()
- resource_path = "api/v2/webhook"
- return self._lr_object.execute("DELETE", resource_path, query_parameters, web_hook_subscribe_model)
+ resource_path = "v2/manage/webhooks/events"
+ return self._lr_object.execute("GET", resource_path, query_parameters, {})
diff --git a/lib/LoginRadius/api/authentication/authentication_api.py b/lib/LoginRadius/api/authentication/authentication_api.py
index 6a8a728..2492bf5 100644
--- a/lib/LoginRadius/api/authentication/authentication_api.py
+++ b/lib/LoginRadius/api/authentication/authentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/onetouchlogin_api.py b/lib/LoginRadius/api/authentication/onetouchlogin_api.py
index fd94141..62b26c4 100644
--- a/lib/LoginRadius/api/authentication/onetouchlogin_api.py
+++ b/lib/LoginRadius/api/authentication/onetouchlogin_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/passwordlesslogin_api.py b/lib/LoginRadius/api/authentication/passwordlesslogin_api.py
index 4d3f0c5..ecadf7f 100644
--- a/lib/LoginRadius/api/authentication/passwordlesslogin_api.py
+++ b/lib/LoginRadius/api/authentication/passwordlesslogin_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/phoneauthentication_api.py b/lib/LoginRadius/api/authentication/phoneauthentication_api.py
index de8568f..9717cf7 100644
--- a/lib/LoginRadius/api/authentication/phoneauthentication_api.py
+++ b/lib/LoginRadius/api/authentication/phoneauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/pinauthentication_api.py b/lib/LoginRadius/api/authentication/pinauthentication_api.py
index b04ce8f..f4a634c 100644
--- a/lib/LoginRadius/api/authentication/pinauthentication_api.py
+++ b/lib/LoginRadius/api/authentication/pinauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/riskbasedauthentication_api.py b/lib/LoginRadius/api/authentication/riskbasedauthentication_api.py
index 5181f0d..0911203 100644
--- a/lib/LoginRadius/api/authentication/riskbasedauthentication_api.py
+++ b/lib/LoginRadius/api/authentication/riskbasedauthentication_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/slidingtoken_api.py b/lib/LoginRadius/api/authentication/slidingtoken_api.py
index 1a5836c..ccdc347 100644
--- a/lib/LoginRadius/api/authentication/slidingtoken_api.py
+++ b/lib/LoginRadius/api/authentication/slidingtoken_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/authentication/smartlogin_api.py b/lib/LoginRadius/api/authentication/smartlogin_api.py
index c9be3d4..c7b3c59 100644
--- a/lib/LoginRadius/api/authentication/smartlogin_api.py
+++ b/lib/LoginRadius/api/authentication/smartlogin_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/social/nativesocial_api.py b/lib/LoginRadius/api/social/nativesocial_api.py
index e4dc078..4bae5d2 100644
--- a/lib/LoginRadius/api/social/nativesocial_api.py
+++ b/lib/LoginRadius/api/social/nativesocial_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/api/social/social_api.py b/lib/LoginRadius/api/social/social_api.py
index 30946d3..3dcede9 100644
--- a/lib/LoginRadius/api/social/social_api.py
+++ b/lib/LoginRadius/api/social/social_api.py
@@ -1,6 +1,6 @@
# -- coding: utf-8 --
# Created by LoginRadius Development Team
-# Copyright 2019 LoginRadius Inc. All rights reserved.
+# Copyright 2025 LoginRadius Inc. All rights reserved.
#
diff --git a/lib/LoginRadius/exceptions.py b/lib/LoginRadius/exceptions.py
index acaf9e0..cd714b8 100644
--- a/lib/LoginRadius/exceptions.py
+++ b/lib/LoginRadius/exceptions.py
@@ -9,7 +9,7 @@
# premium or enterprise members only. #
# In which case, an exception will be raised. #
#################################################
-# Copyright 2019 LoginRadius Inc. #
+# Copyright 2025 LoginRadius Inc. #
# - www.LoginRadius.com #
#################################################
# This file is part of the LoginRadius SDK #
diff --git a/lib/README.md b/lib/README.md
index 219018a..b16c8ec 100644
--- a/lib/README.md
+++ b/lib/README.md
@@ -21,18 +21,50 @@ From Package
Using pip
```
- pip install loginradius-v2==11.6.0
+ pip install loginradius-v2==11.7.0
```
or with easy_install
```
- easy_install loginradius-v2==11.6.0
+ easy_install loginradius-v2==11.7.0
```
Changelog
======
+# Version 11.7.0
+
+**Release Date:** March 28, 2025
+
+## Enhancements
+
+We've introduced a brand-new set of Webhook APIs, designed with enhanced functionality and flexibility. These new APIs support advanced features including:
+
+- Custom header configuration
+- Query parameter support
+- Webhook authentication methods (Bearer Token and Basic Auth)
+- Support for a custom `Name` parameter to label each webhook subscription
+
+As part of this upgrade, the legacy Webhook APIs have been deprecated in favor of the new, more robust versions.
+
+## Newly Added APIs
+
+- `get_webhook_subscription_detail` – Retrieve detailed information about a specific webhook subscription
+- `create_webhook_subscription` – Create a new webhook subscription with advanced configuration options
+- `delete_webhook_subscription` – Remove an existing webhook subscription
+- `update_webhook_subscription` – Modify an existing webhook subscription
+- `list_all_webhooks` – Retrieve a list of all configured webhook subscriptions
+- `get_webhook_events` – Fetch available webhook events supported by the system
+
+## Deprecated APIs
+
+The following legacy APIs have been deprecated:
+
+- `web_hook_subscribe`
+- `webhook_test`
+- `web_hook_unsubscribe`
+- `get_web_hook_subscribed_u_r_ls`
# Version 11.6.0
diff --git a/lib/setup.py b/lib/setup.py
index d7ce6a4..ded349c 100644
--- a/lib/setup.py
+++ b/lib/setup.py
@@ -8,7 +8,7 @@
setuptools.setup(
name = 'LoginRadius-v2',
- version='11.6.0',
+ version='11.7.0',
long_description=long_description,
long_description_content_type='text/markdown',
packages=setuptools.find_packages(),