Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/account/account_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/account/role_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/account/sott_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/advanced/configuration_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/advanced/consentmanagement_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/advanced/customobject_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/advanced/reauthentication_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
91 changes: 65 additions & 26 deletions Demo/LoginRadius/api/advanced/webhook_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand All @@ -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):
Expand All @@ -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
Copy link

Copilot AI Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a spelling error: 'Webhhook' should be corrected to 'Webhook'.

Suggested change
Response Containing List of Webhhook Data
Response Containing List of Webhook Data

Copilot uses AI. Check for mistakes.

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, {})
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/authentication/authentication_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/authentication/onetouchlogin_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/authentication/slidingtoken_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/authentication/smartlogin_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/social/nativesocial_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion Demo/LoginRadius/api/social/social_api.py
Original file line number Diff line number Diff line change
@@ -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.
#


Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading