diff --git a/CHANGELOG.md b/CHANGELOG.md index 2496dd7..918ef0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # LoginRadius Python SDK Change Log +# Version 11.4.0 + +## Enhancements + +- Added additional parameter `startTime` and `endTime` in LoginRadius manual SOTT generation method `get_sott()`. +- Enhancement in `README.md` file. +- Code optimization for better performance. # Version 11.3.0 diff --git a/Demo/requirements.txt b/Demo/requirements.txt index 526ef22..c4d31a4 100644 --- a/Demo/requirements.txt +++ b/Demo/requirements.txt @@ -2,4 +2,5 @@ flask requests pbkdf2 +urllib3 cryptography \ No newline at end of file diff --git a/README.md b/README.md index 5e12983..fb71820 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,14 @@ You will need at least Python - 2.7 or greater. LoginRadius module utilizes the ### Install From Package Using pip -``` - pip install loginradius-v2==11.3.0 +```py + pip install loginradius-v2==11.4.0 ``` or with easy_install -``` - easy_install loginradius-v2==11.3.0 +```py + easy_install loginradius-v2==11.4.0 ``` ### Install From Source @@ -49,14 +49,16 @@ You can download the latest version from PyPI ## Initialize SDK Import the class -``` +```py from LoginRadius import LoginRadius as LR ``` -When you initialize your application, you will need to set your API Key and Secret. This can be found in your [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret). +When you initialize your application, you will need to set your API Key and Secret. This information can be found in your LoginRadius account as described [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret). + + When your Python application initializes, set your API Key and Secret -``` +```py LR.API_KEY = "" LR.API_SECRET = "" loginradius = LR() @@ -65,20 +67,20 @@ When your Python application initializes, set your API Key and Secret ### Custom Domain When initializing the SDK, optionally specify a custom domain. -``` +```py LR.CUSTOM_DOMAIN = "" ``` ### API Request Signing To enable API request signing, set the value of 'API_REQUEST_SIGNING' to True -``` +```py LR.API_REQUEST_SIGNING = True ``` ### X-Origin-IP LoginRadius allows you to add X-Origin-IP in your headers and it determines the IP address of the client's request,this can also be useful to overcome analytics discrepancies where the analytics depend on header data. -``` +```py LR.ORIGIN_IP = "" ``` @@ -131,9 +133,10 @@ List of APIs in this Section:
Auth Update Profile by Token (PUT)
+ This API is used to update the user's profile by passing the access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-update-profile-by-token/) - ``` + ```py access_token = "" #Required user_profile_update_model = { @@ -153,9 +156,10 @@ result = loginradius.authentication.update_profile_by_access_token(access_token,
Auth Unlock Account by Access Token (PUT)
+ This API is used to allow a customer with a valid access token to unlock their account provided that they successfully pass the prompted Bot Protection challenges. The Block or Suspend block types are not applicable for this API. For additional details see our Auth Security Configuration documentation.You are only required to pass the Post Parameters that correspond to the prompted challenges. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-unlock-account-by-access-token/) - ``` + ```py access_token = "" #Required unlock_profile_model = { @@ -169,9 +173,10 @@ result = loginradius.authentication.unlock_account_by_token(access_token, unlock
Auth Verify Email By OTP (PUT)
+ This API is used to verify the email of user when the OTP Email verification flow is enabled, please note that you must contact LoginRadius to have this feature enabled. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-verify-email-by-otp/) - ``` + ```py email_verification_by_otp_model = { "email" : "", @@ -188,9 +193,10 @@ result = loginradius.authentication.verify_email_by_otp(email_verification_by_ot
Auth Reset Password by Security Answer and Email (PUT)
+ This API is used to reset password for the specified account by security question [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-email) - ``` + ```py reset_password_by_security_answer_and_email_model = { "email" : "", @@ -205,9 +211,10 @@ result = loginradius.authentication.reset_password_by_security_answer_and_email(
Auth Reset Password by Security Answer and Phone (PUT)
+ This API is used to reset password for the specified account by security question [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-phone) - ``` + ```py reset_password_by_security_answer_and_phone_model = { "password" : "", @@ -222,9 +229,10 @@ result = loginradius.authentication.reset_password_by_security_answer_and_phone(
Auth Reset Password by Security Answer and UserName (PUT)
+ This API is used to reset password for the specified account by security question [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-username) - ``` + ```py reset_password_by_security_answer_and_user_name_model = { "password" : "", @@ -239,9 +247,10 @@ result = loginradius.authentication.reset_password_by_security_answer_and_user_n
Auth Reset Password by Reset Token (PUT)
+ This API is used to set a new password for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-reset-token) - ``` + ```py reset_password_by_reset_token_model = { "password" : "", @@ -255,9 +264,10 @@ result = loginradius.authentication.reset_password_by_reset_token(reset_password
Auth Reset Password by OTP (PUT)
+ This API is used to set a new password for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-otp) - ``` + ```py reset_password_by_email_and_otp_model = { "email" : "", @@ -272,9 +282,10 @@ result = loginradius.authentication.reset_password_by_email_otp(reset_password_b
Auth Reset Password by OTP and UserName (PUT)
+ This API is used to set a new password for the specified account if you are using the username as the unique identifier in your workflow [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-otp-and-username/) - ``` + ```py reset_password_by_user_name_model = { "otp" : "", @@ -289,9 +300,10 @@ result = loginradius.authentication.reset_password_by_otp_and_user_name(reset_pa
Auth Change Password (PUT)
+ This API is used to change the accounts password based on the previous password [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-change-password) - ``` + ```py access_token = "" #Required new_password = "" #Required @@ -304,9 +316,10 @@ result = loginradius.authentication.change_password(access_token, new_password,
Auth Set or Change UserName (PUT)
+ This API is used to set or change UserName by access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-set-or-change-user-name/) - ``` + ```py access_token = "" #Required username = "" #Required @@ -318,9 +331,10 @@ result = loginradius.authentication.set_or_change_user_name(access_token, userna
Auth Resend Email Verification (PUT)
+ This API resends the verification email to the user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-resend-email-verification/) - ``` + ```py email = "" #Required email_template = "" #Optional @@ -333,9 +347,10 @@ result = loginradius.authentication.auth_resend_email_verification(email, email_
Auth Add Email (POST)
+ This API is used to add additional emails to a user's account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-add-email) - ``` + ```py access_token = "" #Required email = "" #Required @@ -350,9 +365,10 @@ result = loginradius.authentication.add_email(access_token, email, type, email_t
Auth Login by Email (POST)
+ This API retrieves a copy of the user data based on the Email [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-email) - ``` + ```py email_authentication_model = { "email" : "", @@ -370,9 +386,10 @@ result = loginradius.authentication.login_by_email(email_authentication_model, e
Auth Login by Username (POST)
+ This API retrieves a copy of the user data based on the Username [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-username) - ``` + ```py user_name_authentication_model = { "password" : "", @@ -390,9 +407,10 @@ result = loginradius.authentication.login_by_user_name(user_name_authentication_
Auth Forgot Password (POST)
+ This API is used to send the reset password url to a specified account. Note: If you have the UserName workflow enabled, you may replace the 'email' parameter with 'username' [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-forgot-password) - ``` + ```py email = "" #Required reset_password_url = "" #Required @@ -405,9 +423,10 @@ result = loginradius.authentication.forgot_password(email, reset_password_url, e
Auth Link Social Identities (POST)
+ This API is used to link up a social provider account with an existing LoginRadius account on the basis of access token and the social providers user access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities) - ``` + ```py access_token = "" #Required candidate_token = "" #Required @@ -419,9 +438,10 @@ result = loginradius.authentication.link_social_identities(access_token, candida
Auth Link Social Identities By Ping (POST)
+ This API is used to link up a social provider account with an existing LoginRadius account on the basis of ping and the social providers user access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities-by-ping) - ``` + ```py access_token = "" #Required client_guid = "" #Required @@ -433,9 +453,10 @@ result = loginradius.authentication.link_social_identities_by_ping(access_token,
Auth User Registration by Email (POST)
+ This API creates a user in the database as well as sends a verification email to the user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-user-registration-by-email) - ``` + ```py auth_user_registration_model = { "email" : [ { @@ -460,9 +481,10 @@ result = loginradius.authentication.user_registration_by_email(auth_user_registr
Auth User Registration By Captcha (POST)
+ This API creates a user in the database as well as sends a verification email to the user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-user-registration-by-recaptcha) - ``` + ```py auth_user_registration_model_with_captcha = { "email" : [ { @@ -488,9 +510,10 @@ result = loginradius.authentication.user_registration_by_captcha(auth_user_regis
Get Security Questions By Email (GET)
+ This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-email/) - ``` + ```py email = "" #Required @@ -501,9 +524,10 @@ result = loginradius.authentication.get_security_questions_by_email(email)
Get Security Questions By UserName (GET)
+ This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-user-name/) - ``` + ```py user_name = "" #Required @@ -514,9 +538,10 @@ result = loginradius.authentication.get_security_questions_by_user_name(user_nam
Get Security Questions By Phone (GET)
+ This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-phone/) - ``` + ```py phone = "" #Required @@ -527,9 +552,10 @@ result = loginradius.authentication.get_security_questions_by_phone(phone)
Get Security Questions By Access Token (GET)
+ This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-access-token/) - ``` + ```py access_token = "" #Required @@ -540,9 +566,10 @@ result = loginradius.authentication.get_security_questions_by_access_token(acces
Auth Validate Access token (GET)
+ This api validates access token, if valid then returns a response with its expiry otherwise error. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-validate-access-token/) - ``` + ```py access_token = "" #Required @@ -553,9 +580,10 @@ result = loginradius.authentication.auth_validate_access_token(access_token)
Access Token Invalidate (GET)
+ This api call invalidates the active access token or expires an access token's validity. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-invalidate-access-token/) - ``` + ```py access_token = "" #Required prevent_refresh = "True" #Optional @@ -567,9 +595,10 @@ result = loginradius.authentication.auth_in_validate_access_token(access_token,
Access Token Info (GET)
+ This api call provide the active access token Information [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-access-token-info/) - ``` + ```py access_token = "" #Required @@ -580,9 +609,10 @@ result = loginradius.authentication.get_access_token_info(access_token)
Auth Read all Profiles by Token (GET)
+ This API retrieves a copy of the user data based on the access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-read-profiles-by-token/) - ``` + ```py access_token = "" #Required fields = "" #Optional @@ -597,9 +627,10 @@ result = loginradius.authentication.get_profile_by_access_token(access_token, fi
Auth Send Welcome Email (GET)
+ This API sends a welcome email [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-send-welcome-email/) - ``` + ```py access_token = "" #Required welcome_email_template = "" #Optional @@ -611,9 +642,10 @@ result = loginradius.authentication.send_welcome_email(access_token, welcome_ema
Auth Delete Account (GET)
+ This API is used to delete an account by passing it a delete token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-delete-account/) - ``` + ```py deletetoken = "" #Required @@ -622,9 +654,10 @@ result = loginradius.authentication.delete_account_by_delete_token(deletetoken)
Get Profile By Ping (GET)
+ This API is used to get a user's profile using the clientGuid parameter if no callback feature enabled. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/social-login-by-ping/) - ``` + ```py client_guid = "" #Required email_template = "" #Optional @@ -639,9 +672,10 @@ result = loginradius.authentication.get_profile_by_ping(client_guid, email_templ
Auth Check Email Availability (GET)
+ This API is used to check the email exists or not on your site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-email-availability/) - ``` + ```py email = "" #Required @@ -652,9 +686,10 @@ result = loginradius.authentication.check_email_availability(email)
Auth Verify Email (GET)
+ This API is used to verify the email of user. Note: This API will only return the full profile if you have 'Enable auto login after email verification' set in your LoginRadius Admin Console's Email Workflow settings under 'Verification Email'. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-verify-email/) - ``` + ```py verification_token = "" #Required fields = "" #Optional @@ -668,9 +703,10 @@ result = loginradius.authentication.verify_email(verification_token, fields, url
Auth Check UserName Availability (GET)
+ This API is used to check the UserName exists or not on your site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-username-availability/) - ``` + ```py username = "" #Required @@ -681,9 +717,10 @@ result = loginradius.authentication.check_user_name_availability(username)
Auth Privacy Policy Accept (GET)
+ This API is used to update the privacy policy stored in the user's profile by providing the access token of the user accepting the privacy policy [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-privacy-policy-accept) - ``` + ```py access_token = "" #Required fields = "" #Optional @@ -695,9 +732,10 @@ result = loginradius.authentication.accept_privacy_policy(access_token, fields)
Auth Privacy Policy History By Access Token (GET)
+ This API will return all the accepted privacy policies for the user by providing the access token of that user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/privacy-policy-history-by-access-token/) - ``` + ```py access_token = "" #Required @@ -708,9 +746,10 @@ result = loginradius.authentication.get_privacy_policy_history_by_access_token(a
Auth Delete Account with Email Confirmation (DELETE)
+ This API will send a confirmation email for account deletion to the customer's email when passed the customer's access token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-delete-account-with-email-confirmation/) - ``` + ```py access_token = "" #Required delete_url = "" #Optional @@ -723,9 +762,10 @@ result = loginradius.authentication.delete_account_with_email_confirmation(acces
Auth Remove Email (DELETE)
+ This API is used to remove additional emails from a user's account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-remove-email) - ``` + ```py access_token = "" #Required email = "" #Required @@ -737,9 +777,10 @@ result = loginradius.authentication.remove_email(access_token, email)
Auth Unlink Social Identities (DELETE)
+ This API is used to unlink up a social provider account with the specified account based on the access token and the social providers user access token. The unlinked account will automatically get removed from your database. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-unlink-social-identities) - ``` + ```py access_token = "" #Required provider = "" #Required @@ -786,9 +827,10 @@ List of APIs in this Section:
Account Update (PUT)
+ This API is used to update the information of existing accounts in your Cloud Storage. See our Advanced API Usage section Here for more capabilities. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-update) - ``` + ```py account_user_profile_update_model = { "firstName" : "", @@ -805,9 +847,10 @@ result = loginradius.account.update_account_by_uid(account_user_profile_update_m
Update Phone ID by UID (PUT)
+ This API is used to update the PhoneId by using the Uid's. Admin can update the PhoneId's for both the verified and unverified profiles. It will directly replace the PhoneId and bypass the OTP verification process. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/update-phoneid-by-uid) - ``` + ```py phone = "" #Required uid = "" #Required @@ -820,9 +863,10 @@ result = loginradius.account.update_phone_id_by_uid(phone, uid, fields)
Account Set Password (PUT)
+ This API is used to set the password of an account in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-set-password) - ``` + ```py password = "" #Required uid = "" #Required @@ -834,9 +878,10 @@ result = loginradius.account.set_account_password_by_uid(password, uid)
Account Invalidate Verification Email (PUT)
+ This API is used to invalidate the Email Verification status on an account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-invalidate-verification-email) - ``` + ```py uid = "" #Required email_template = "" #Optional @@ -849,9 +894,10 @@ result = loginradius.account.invalidate_account_email_verification(uid, email_te
Reset phone ID verification (PUT)
+ This API Allows you to reset the phone no verification of an end user’s account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/reset-phone-id-verification) - ``` + ```py uid = "" #Required sms_template = "" #Optional @@ -863,9 +909,10 @@ result = loginradius.account.reset_phone_id_verification_by_uid(uid, sms_templat
Upsert Email (PUT)
+ This API is used to add/upsert another emails in account profile by different-different email types. If the email type is same then it will simply update the existing email, otherwise it will add a new email in Email array. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/upsert-email) - ``` + ```py upsert_email_model = { "email" : [ { @@ -883,9 +930,10 @@ result = loginradius.account.upsert_email(upsert_email_model, uid, fields)
Update UID (PUT)
+ This API is used to update a user's Uid. It will update all profiles, custom objects and consent management logs associated with the Uid. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-update/) - ``` + ```py update_uid_model = { "newUid" : "" @@ -899,9 +947,10 @@ result = loginradius.account.account_update_uid(update_uid_model, uid)
Account Create (POST)
+ This API is used to create an account in Cloud Storage. This API bypass the normal email verification process and manually creates the user.

In order to use this API, you need to format a JSON request body with all of the mandatory fields [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-create) - ``` + ```py account_create_model = { "email" : [ { @@ -921,9 +970,10 @@ result = loginradius.account.create_account(account_create_model, fields)
Forgot Password token (POST)
+ This API Returns a Forgot Password Token it can also be used to send a Forgot Password email to the customer. Note: If you have the UserName workflow enabled, you may replace the 'email' parameter with 'username' in the body. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/get-forgot-password-token) - ``` + ```py email = "" #Required email_template = "" #Optional @@ -937,9 +987,10 @@ result = loginradius.account.get_forgot_password_token(email, email_template, re
Email Verification token (POST)
+ This API Returns an Email Verification token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/get-email-verification-token) - ``` + ```py email = "" #Required @@ -950,9 +1001,10 @@ result = loginradius.account.get_email_verification_token(email)
Get Privacy Policy History By Uid (GET)
+ This API is used to retrieve all of the accepted Policies by the user, associated with their UID. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/privacy-policy-history-by-uid/) - ``` + ```py uid = "" #Required @@ -963,9 +1015,10 @@ result = loginradius.account.get_privacy_policy_history_by_uid(uid)
Account Profiles by Email (GET)
+ This API is used to retrieve all of the profile data, associated with the specified account by email in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-email) - ``` + ```py email = "" #Required fields = "" #Optional @@ -977,9 +1030,10 @@ result = loginradius.account.get_account_profile_by_email(email, fields)
Account Profiles by Username (GET)
+ This API is used to retrieve all of the profile data associated with the specified account by user name in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-user-name) - ``` + ```py user_name = "" #Required fields = "" #Optional @@ -991,9 +1045,10 @@ result = loginradius.account.get_account_profile_by_user_name(user_name, fields)
Account Profile by Phone ID (GET)
+ This API is used to retrieve all of the profile data, associated with the account by phone number in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-phone-id/) - ``` + ```py phone = "" #Required fields = "" #Optional @@ -1005,9 +1060,10 @@ result = loginradius.account.get_account_profile_by_phone(phone, fields)
Account Profiles by UID (GET)
+ This API is used to retrieve all of the profile data, associated with the account by uid in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-uid) - ``` + ```py uid = "" #Required fields = "" #Optional @@ -1019,9 +1075,10 @@ result = loginradius.account.get_account_profile_by_uid(uid, fields)
Account Password (GET)
+ This API use to retrive the hashed password of a specified account in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-password) - ``` + ```py uid = "" #Required @@ -1032,9 +1089,10 @@ result = loginradius.account.get_account_password_hash_by_uid(uid)
Access Token based on UID or User impersonation API (GET)
+ The API is used to get LoginRadius access token based on UID. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-impersonation-api) - ``` + ```py uid = "" #Required @@ -1045,9 +1103,10 @@ result = loginradius.account.get_access_token_by_uid(uid)
Refresh Access Token by Refresh Token (GET)
+ This API is used to refresh an access token via it's associated refresh token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-access-token-by-refresh-token) - ``` + ```py refresh_token = "" #Required @@ -1058,9 +1117,10 @@ result = loginradius.account.refresh_access_token_by_refresh_token(refresh_token
Revoke Refresh Token (GET)
+ The Revoke Refresh Access Token API is used to revoke a refresh token or the Provider Access Token, revoking an existing refresh token will invalidate the refresh token but the associated access token will work until the expiry. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/revoke-refresh-token) - ``` + ```py refresh_token = "" #Required @@ -1071,9 +1131,10 @@ result = loginradius.account.revoke_refresh_token(refresh_token)
Account Identities by Email (GET)
+ Note: This is intended for specific workflows where an email may be associated to multiple UIDs. This API is used to retrieve all of the identities (UID and Profiles), associated with a specified email in Cloud Storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-identities-by-email) - ``` + ```py email = "" #Required fields = "" #Optional @@ -1085,9 +1146,10 @@ result = loginradius.account.get_account_identities_by_email(email, fields)
Account Delete (DELETE)
+ This API deletes the Users account and allows them to re-register for a new account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-delete) - ``` + ```py uid = "" #Required @@ -1098,9 +1160,10 @@ result = loginradius.account.delete_account_by_uid(uid)
Account Remove Email (DELETE)
+ Use this API to Remove emails from a user Account [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-email-delete) - ``` + ```py email = "" #Required uid = "" #Required @@ -1113,9 +1176,10 @@ result = loginradius.account.remove_email(email, uid, fields)
Delete User Profiles By Email (DELETE)
+ This API is used to delete all user profiles associated with an Email. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-email-delete/) - ``` + ```py email = "" #Required @@ -1170,9 +1234,10 @@ List of APIs in this Section:
Post Message API (POST)
+ Post Message API is used to post messages to the user's contacts.

Supported Providers: Twitter, LinkedIn

The Message API is used to post messages to the user?s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.

GET & POST Message API work the same way except the API method is different [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post-message-api) - ``` + ```py access_token = "" #Required message = "" #Required @@ -1186,9 +1251,10 @@ result = loginradius.social.post_message(access_token, message, subject, to)
Status Posting (POST)
+ The Status API is used to update the status on the user's wall.

Supported Providers: Facebook, Twitter, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/status-posting/) - ``` + ```py access_token = "" #Required caption = "" #Required @@ -1206,9 +1272,10 @@ result = loginradius.social.status_posting(access_token, caption, description, i
Trackable Status Posting (POST)
+ The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.

POST Input Parameter Format: application/x-www-form-urlencoded [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/trackable-status-posting/) - ``` + ```py access_token = "" #Required status_model = { @@ -1227,9 +1294,10 @@ result = loginradius.social.trackable_status_posting(access_token, status_model)
Access Token (GET)
+ This API Is used to translate the Request Token returned during authentication into an Access Token that can be used with other API calls. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/access-token) - ``` + ```py token = "" #Required @@ -1240,9 +1308,10 @@ result = loginradius.social.exchange_access_token(token)
Refresh Token (GET)
+ The Refresh Access Token API is used to refresh the provider access token after authentication. It will be valid for up to 60 days on LoginRadius depending on the provider. In order to use the access token in other APIs, always refresh the token using this API.

Supported Providers : Facebook,Yahoo,Google,Twitter, Linkedin.

Contact LoginRadius support team to enable this API. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-token) - ``` + ```py access_token = "" #Required expires_in = 0 #Optional @@ -1255,9 +1324,10 @@ result = loginradius.social.refresh_access_token(access_token, expires_in, is_we
Token Validate (GET)
+ This API validates access token, if valid then returns a response with its expiry otherwise error. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/validate-access-token) - ``` + ```py access_token = "" #Required @@ -1268,9 +1338,10 @@ result = loginradius.social.validate_access_token(access_token)
Access Token Invalidate (GET)
+ This api invalidates the active access token or expires an access token validity. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/invalidate-access-token) - ``` + ```py access_token = "" #Required @@ -1281,9 +1352,10 @@ result = loginradius.social.in_validate_access_token(access_token)
Get Active Session Details (GET)
+ This api is use to get all active session by Access Token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/get-active-session-details) - ``` + ```py token = "" #Required @@ -1294,9 +1366,10 @@ result = loginradius.social.get_active_session(token)
Get Active Session By Account Id (GET)
+ This api is used to get all active sessions by AccountID(UID). [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/active-session-by-account-id/) - ``` + ```py account_id = "" #Required @@ -1307,9 +1380,10 @@ result = loginradius.social.get_active_session_by_account_id(account_id)
Get Active Session By Profile Id (GET)
+ This api is used to get all active sessions by ProfileId. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/active-session-by-profile-id/) - ``` + ```py profile_id = "" #Required @@ -1320,9 +1394,10 @@ result = loginradius.social.get_active_session_by_profile_id(profile_id)
Album (GET)
+ Supported Providers: Facebook, Google, Live, Vkontakte.

This API returns the photo albums associated with the passed in access tokens Social Profile. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/album/) - ``` + ```py access_token = "" #Required @@ -1333,9 +1408,10 @@ result = loginradius.social.get_albums(access_token)
Get Albums with cursor (GET)
+ Supported Providers: Facebook, Google, Live, Vkontakte.

This API returns the photo albums associated with the passed in access tokens Social Profile. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/album/) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1347,9 +1423,10 @@ result = loginradius.social.get_albums_with_cursor(access_token, next_cursor)
Audio (GET)
+ The Audio API is used to get audio files data from the user's social account.

Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio) - ``` + ```py access_token = "" #Required @@ -1360,9 +1437,10 @@ result = loginradius.social.get_audios(access_token)
Get Audio With Cursor (GET)
+ The Audio API is used to get audio files data from the user's social account.

Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1374,9 +1452,10 @@ result = loginradius.social.get_audios_with_cursor(access_token, next_cursor)
Check In (GET)
+ The Check In API is used to get check Ins data from the user's social account.

Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in) - ``` + ```py access_token = "" #Required @@ -1387,9 +1466,10 @@ result = loginradius.social.get_check_ins(access_token)
Get CheckIns With Cursor (GET)
+ The Check In API is used to get check Ins data from the user's social account.

Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1401,9 +1481,10 @@ result = loginradius.social.get_check_ins_with_cursor(access_token, next_cursor)
Contact (GET)
+ The Contact API is used to get contacts/friends/connections data from the user's social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius' standard data format. This API requires setting permissions in your LoginRadius Dashboard.

Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.

Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/contact) - ``` + ```py access_token = "" #Required next_cursor = "" #Optional @@ -1415,9 +1496,10 @@ result = loginradius.social.get_contacts(access_token, next_cursor)
Event (GET)
+ The Event API is used to get the event data from the user's social account.

Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event) - ``` + ```py access_token = "" #Required @@ -1428,9 +1510,10 @@ result = loginradius.social.get_events(access_token)
Get Events With Cursor (GET)
+ The Event API is used to get the event data from the user's social account.

Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1442,9 +1525,10 @@ result = loginradius.social.get_events_with_cursor(access_token, next_cursor)
Following (GET)
+ Get the following user list from the user's social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following) - ``` + ```py access_token = "" #Required @@ -1455,9 +1539,10 @@ result = loginradius.social.get_followings(access_token)
Get Followings With Cursor (GET)
+ Get the following user list from the user's social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1469,9 +1554,10 @@ result = loginradius.social.get_followings_with_cursor(access_token, next_cursor
Group (GET)
+ The Group API is used to get group data from the user's social account.

Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group) - ``` + ```py access_token = "" #Required @@ -1482,9 +1568,10 @@ result = loginradius.social.get_groups(access_token)
Get Groups With Cursor (GET)
+ The Group API is used to get group data from the user's social account.

Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1496,9 +1583,10 @@ result = loginradius.social.get_groups_with_cursor(access_token, next_cursor)
Like (GET)
+ The Like API is used to get likes data from the user's social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like) - ``` + ```py access_token = "" #Required @@ -1509,9 +1597,10 @@ result = loginradius.social.get_likes(access_token)
Get Likes With Cursor (GET)
+ The Like API is used to get likes data from the user's social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1523,9 +1612,10 @@ result = loginradius.social.get_likes_with_cursor(access_token, next_cursor)
Mention (GET)
+ The Mention API is used to get mentions data from the user's social account.

Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/mention) - ``` + ```py access_token = "" #Required @@ -1536,9 +1626,10 @@ result = loginradius.social.get_mentions(access_token)
Page (GET)
+ The Page API is used to get the page data from the user's social account.

Supported Providers: Facebook, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/page) - ``` + ```py access_token = "" #Required page_name = "" #Required @@ -1550,9 +1641,10 @@ result = loginradius.social.get_page(access_token, page_name)
Photo (GET)
+ The Photo API is used to get photo data from the user's social account.

Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/photo) - ``` + ```py access_token = "" #Required album_id = "" #Required @@ -1564,9 +1656,10 @@ result = loginradius.social.get_photos(access_token, album_id)
Get Post (GET)
+ The Post API is used to get post message data from the user's social account.

Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post) - ``` + ```py access_token = "" #Required @@ -1577,9 +1670,10 @@ result = loginradius.social.get_posts(access_token)
Get Trackable Status Stats (GET)
+ The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/get-trackable-status-stats/) - ``` + ```py access_token = "" #Required caption = "" #Required @@ -1596,9 +1690,10 @@ result = loginradius.social.get_trackable_status_stats(access_token, caption, de
Trackable Status Fetching (GET)
+ The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.

This API is used to retrieve a tracked post based on the passed in post ID value. This API requires setting permissions in your LoginRadius Dashboard.

Note: To utilize this API you need to find the ID for the post you want to track, which might require using Trackable Status Posting API first. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/trackable-status-fetching/) - ``` + ```py post_id = "" #Required @@ -1610,9 +1705,10 @@ result = loginradius.social.trackable_status_fetching(post_id)
Refresh User Profile (GET)
+ The User Profile API is used to get the latest updated social profile data from the user's social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius' standard data format. This API should be called using the access token retrieved from the refresh access token API. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-user-profile) - ``` + ```py access_token = "" #Required fields = "" #Optional @@ -1624,9 +1720,10 @@ result = loginradius.social.get_refreshed_social_user_profile(access_token, fiel
Video (GET)
+ The Video API is used to get video files data from the user's social account.

Supported Providers: Facebook, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/video) - ``` + ```py access_token = "" #Required next_cursor = "" #Required @@ -1659,9 +1756,10 @@ List of APIs in this Section:
Custom Object Update by Access Token (PUT)
+ This API is used to update the specified custom object data of the specified account. If the value of updatetype is 'replace' then it will fully replace custom object with the new custom object and if the value of updatetype is 'partialreplace' then it will perform an upsert type operation [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-update-by-objectrecordid-and-token) - ``` + ```py access_token = "" #Required object_name = "" #Required @@ -1676,9 +1774,10 @@ result = loginradius.custom_object.update_custom_object_by_token(access_token, o
Custom Object Update by UID (PUT)
+ This API is used to update the specified custom object data of a specified account. If the value of updatetype is 'replace' then it will fully replace custom object with new custom object and if the value of updatetype is partialreplace then it will perform an upsert type operation. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-update-by-objectrecordid-and-uid) - ``` + ```py object_name = "" #Required object_record_id = "" #Required @@ -1693,9 +1792,10 @@ result = loginradius.custom_object.update_custom_object_by_uid(object_name, obje
Create Custom Object by Token (POST)
+ This API is used to write information in JSON format to the custom object for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/create-custom-object-by-token) - ``` + ```py access_token = "" #Required object_name = "" #Required @@ -1708,9 +1808,10 @@ result = loginradius.custom_object.create_custom_object_by_token(access_token, o
Create Custom Object by UID (POST)
+ This API is used to write information in JSON format to the custom object for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/create-custom-object-by-uid) - ``` + ```py object_name = "" #Required object = { "customdata1": "Store my customdata1 value"} #Required @@ -1723,9 +1824,10 @@ result = loginradius.custom_object.create_custom_object_by_uid(object_name, obje
Custom Object by Token (GET)
+ This API is used to retrieve the specified Custom Object data for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-token) - ``` + ```py access_token = "" #Required object_name = "" #Required @@ -1737,9 +1839,10 @@ result = loginradius.custom_object.get_custom_object_by_token(access_token, obje
Custom Object by ObjectRecordId and Token (GET)
+ This API is used to retrieve the Custom Object data for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-objectrecordid-and-token) - ``` + ```py access_token = "" #Required object_name = "" #Required @@ -1752,9 +1855,10 @@ result = loginradius.custom_object.get_custom_object_by_record_id_and_token(acce
Custom Object By UID (GET)
+ This API is used to retrieve all the custom objects by UID from cloud storage. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-uid) - ``` + ```py object_name = "" #Required uid = "" #Required @@ -1766,9 +1870,10 @@ result = loginradius.custom_object.get_custom_object_by_uid(object_name, uid)
Custom Object by ObjectRecordId and UID (GET)
+ This API is used to retrieve the Custom Object data for the specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-objectrecordid-and-uid) - ``` + ```py object_name = "" #Required object_record_id = "" #Required @@ -1781,9 +1886,10 @@ result = loginradius.custom_object.get_custom_object_by_record_id(object_name, o
Custom Object Delete by Record Id And Token (DELETE)
+ This API is used to remove the specified Custom Object data using ObjectRecordId of a specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-delete-by-objectrecordid-and-token) - ``` + ```py access_token = "" #Required object_name = "" #Required @@ -1796,9 +1902,10 @@ result = loginradius.custom_object.delete_custom_object_by_token(access_token, o
Account Delete Custom Object by ObjectRecordId (DELETE)
+ This API is used to remove the specified Custom Object data using ObjectRecordId of specified account. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-delete-by-objectrecordid-and-uid) - ``` + ```py object_name = "" #Required object_record_id = "" #Required @@ -1833,9 +1940,10 @@ List of APIs in this Section:
Phone Reset Password by OTP (PUT)
+ This API is used to reset the password [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-reset-password-by-otp) - ``` + ```py reset_password_by_otp_model = { "otp" : "", @@ -1850,9 +1958,10 @@ result = loginradius.phone_authentication.reset_password_by_phone_otp(reset_pass
Phone Verification OTP (PUT)
+ This API is used to validate the verification code sent to verify a user's phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-verify-otp) - ``` + ```py otp = "" #Required phone = "" #Required @@ -1866,9 +1975,10 @@ result = loginradius.phone_authentication.phone_verification_by_otp(otp, phone,
Phone Verification OTP by Token (PUT)
+ This API is used to consume the verification code sent to verify a user's phone number. Use this call for front-end purposes in cases where the user is already logged in by passing the user's access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-verify-otp-by-token) - ``` + ```py access_token = "" #Required otp = "" #Required @@ -1881,9 +1991,10 @@ result = loginradius.phone_authentication.phone_verification_otp_by_access_token
Phone Number Update (PUT)
+ This API is used to update the login Phone Number of users [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-number-update) - ``` + ```py access_token = "" #Required phone = "" #Required @@ -1896,9 +2007,10 @@ result = loginradius.phone_authentication.update_phone_number(access_token, phon
Phone Login (POST)
+ This API retrieves a copy of the user data based on the Phone [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-login) - ``` + ```py phone_authentication_model = { "password" : "", @@ -1915,9 +2027,10 @@ result = loginradius.phone_authentication.login_by_phone(phone_authentication_mo
Phone Forgot Password by OTP (POST)
+ This API is used to send the OTP to reset the account password. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-forgot-password-by-otp) - ``` + ```py phone = "" #Required sms_template = "" #Optional @@ -1929,9 +2042,10 @@ result = loginradius.phone_authentication.forgot_password_by_phone_otp(phone, sm
Phone Resend Verification OTP (POST)
+ This API is used to resend a verification OTP to verify a user's Phone Number. The user will receive a verification code that they will need to input [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-resend-otp) - ``` + ```py phone = "" #Required sms_template = "" #Optional @@ -1943,9 +2057,10 @@ result = loginradius.phone_authentication.phone_resend_verification_otp(phone, s
Phone Resend Verification OTP By Token (POST)
+ This API is used to resend a verification OTP to verify a user's Phone Number in cases in which an active token already exists [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-resend-otp-by-token) - ``` + ```py access_token = "" #Required phone = "" #Required @@ -1958,9 +2073,10 @@ result = loginradius.phone_authentication.phone_resend_verification_otp_by_token
Phone User Registration by SMS (POST)
+ This API registers the new users into your Cloud Storage and triggers the phone verification process. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-user-registration-by-sms) - ``` + ```py auth_user_registration_model = { "firstName" : "", @@ -1982,9 +2098,10 @@ result = loginradius.phone_authentication.user_registration_by_phone(auth_user_r
Phone Number Availability (GET)
+ This API is used to check the Phone Number exists or not on your site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-number-availability) - ``` + ```py phone = "" #Required @@ -1995,9 +2112,10 @@ result = loginradius.phone_authentication.check_phone_number_availability(phone)
Remove Phone ID by Access Token (DELETE)
+ This API is used to delete the Phone ID on a user's account via the access token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/remove-phone-id-by-access-token) - ``` + ```py access_token = "" #Required @@ -2050,9 +2168,10 @@ List of APIs in this Section:
Update MFA Setting (PUT)
+ This API is used to trigger the Multi-factor authentication settings after login for secure actions [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/update-mfa-setting/) - ``` + ```py access_token = "" #Required multi_factor_auth_model_with_lockout = { @@ -2067,9 +2186,10 @@ result = loginradius.mfa.mfa_update_setting(access_token, multi_factor_auth_mode
Update MFA by Access Token (PUT)
+ This API is used to Enable Multi-factor authentication by access token on user login [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/google-authenticator/update-mfa-by-access-token/) - ``` + ```py access_token = "" #Required multi_factor_auth_model_by_google_authenticator_code = { @@ -2085,9 +2205,10 @@ result = loginradius.mfa.mfa_update_by_access_token(access_token, multi_factor_a
MFA Update Phone Number by Token (PUT)
+ This API is used to update the Multi-factor authentication phone number by sending the verification OTP to the provided phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-update-phone-number-by-token/) - ``` + ```py access_token = "" #Required phone_no2_f_a = "" #Required @@ -2100,9 +2221,10 @@ result = loginradius.mfa.mfa_update_phone_number_by_token(access_token, phone_no
Verify MFA Email OTP by Access Token (PUT)
+ This API is used to set up MFA Email OTP authenticator on profile after login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/verify-mfa-otp-by-access-token/) - ``` + ```py access_token = "" #Required multi_factor_auth_model_by_email_otp_with_lockout = { @@ -2117,9 +2239,10 @@ result = loginradius.mfa.mfa_validate_email_otp_by_access_token(access_token, mu
Update MFA Security Question by Access Token (PUT)
+ This API is used to set up MFA Security Question authenticator on profile after login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/update-mfa-security-question-by-access-token) - ``` + ```py access_token = "" #Required security_question_answer_model_by_access_token = { @@ -2139,9 +2262,10 @@ result = loginradius.mfa.mfa_security_question_answer_by_access_token(access_tok
MFA Validate OTP (PUT)
+ This API is used to login via Multi-factor authentication by passing the One Time Password received via SMS [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-validate-otp/) - ``` + ```py multi_factor_auth_model_with_lockout = { "otp" : "" @@ -2161,9 +2285,10 @@ result = loginradius.mfa.mfa_validate_otp_by_phone(multi_factor_auth_model_with_
MFA Validate Google Auth Code (PUT)
+ This API is used to login via Multi-factor-authentication by passing the google authenticator code. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/google-authenticator/mfa-validate-google-auth-code/) - ``` + ```py google_authenticator_code = "" #Required second_factor_authentication_token = "" #Required @@ -2180,9 +2305,10 @@ result = loginradius.mfa.mfa_validate_google_auth_code(google_authenticator_code
MFA Validate Backup code (PUT)
+ This API is used to validate the backup code provided by the user and if valid, we return an access token allowing the user to login incases where Multi-factor authentication (MFA) is enabled and the secondary factor is unavailable. When a user initially downloads the Backup codes, We generate 10 codes, each code can only be consumed once. if any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-validate-backup-code/) - ``` + ```py multi_factor_auth_model_by_backup_code = { "backupCode" : "" @@ -2201,9 +2327,10 @@ result = loginradius.mfa.mfa_validate_backup_code(multi_factor_auth_model_by_bac
MFA Update Phone Number (PUT)
+ This API is used to update (if configured) the phone number used for Multi-factor authentication by sending the verification OTP to the provided phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-update-phone-number/) - ``` + ```py phone_no2_f_a = "" #Required second_factor_authentication_token = "" #Required @@ -2216,9 +2343,10 @@ result = loginradius.mfa.mfa_update_phone_number(phone_no2_f_a, second_factor_au
Verify MFA Email OTP by MFA Token (PUT)
+ This API is used to Verify MFA Email OTP by MFA Token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/verify-mfa-email-otp-by-mfa-token/) - ``` + ```py multi_factor_auth_model_by_email_otp = { @@ -2238,9 +2366,10 @@ result = loginradius.mfa.mfa_validate_email_otp(multi_factor_auth_model_by_email
Update MFA Security Question by MFA Token (PUT)
+ This API is used to set the security questions on the profile with the MFA token when MFA flow is required. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/update-mfa-security-question-by-mfa-token/) - ``` + ```py security_question_answer_update_model = { "securityquestionanswer": [ @@ -2259,9 +2388,10 @@ result = loginradius.mfa.mfa_security_question_answer(security_question_answer_u
MFA Email Login (POST)
+ This API can be used to login by emailid on a Multi-factor authentication enabled LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-email-login) - ``` + ```py email = "" #Required password = "" #Required @@ -2281,9 +2411,10 @@ result = loginradius.mfa.mfa_login_by_email(email, password, email_template, fie
MFA UserName Login (POST)
+ This API can be used to login by username on a Multi-factor authentication enabled LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-user-name-login) - ``` + ```py password = "" #Required username = "" #Required @@ -2303,9 +2434,10 @@ result = loginradius.mfa.mfa_login_by_user_name(password, username, email_templa
MFA Phone Login (POST)
+ This API can be used to login by Phone on a Multi-factor authentication enabled LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-phone-login) - ``` + ```py password = "" #Required phone = "" #Required @@ -2325,9 +2457,10 @@ result = loginradius.mfa.mfa_login_by_phone(password, phone, email_template, fie
Send MFA Email OTP by MFA Token (POST)
+ An API designed to send the MFA Email OTP to the email. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/send-mfa-email-otp-by-mfa-token/) - ``` + ```py email_id_model = { "EmailId":"email" @@ -2342,9 +2475,10 @@ result = loginradius.mfa.mfa_email_otp(email_id_model, second_factor_authenticat
Verify MFA Security Question by MFA Token (POST)
+ This API is used to resending the verification OTP to the provided phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/verify-mfa-security-question-by-mfa-token/) - ``` + ```py security_question_answer_update_model = { "securityquestionanswer": [ @@ -2367,9 +2501,10 @@ result = loginradius.mfa.mfa_security_question_answer_verification(security_ques
MFA Validate Access Token (GET)
+ This API is used to configure the Multi-factor authentication after login by using the access token when MFA is set as optional on the LoginRadius site. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-validate-access-token/) - ``` + ```py access_token = "" #Required sms_template2_f_a = "" #Optional @@ -2381,9 +2516,10 @@ result = loginradius.mfa.mfa_configure_by_access_token(access_token, sms_templat
MFA Backup Code by Access Token (GET)
+ This API is used to get a set of backup codes via access token to allow the user login on a site that has Multi-factor Authentication enabled in the event that the user does not have a secondary factor available. We generate 10 codes, each code can only be consumed once. If any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-access-token/) - ``` + ```py access_token = "" #Required @@ -2394,9 +2530,10 @@ result = loginradius.mfa.mfa_backup_code_by_access_token(access_token)
Reset Backup Code by Access Token (GET)
+ API is used to reset the backup codes on a given account via the access token. This API call will generate 10 new codes, each code can only be consumed once [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-reset-backup-code-by-access-token/) - ``` + ```py access_token = "" #Required @@ -2407,9 +2544,10 @@ result = loginradius.mfa.mfa_reset_backup_code_by_access_token(access_token)
Send MFA Email OTP by Access Token (GET)
+ This API is created to send the OTP to the email if email OTP authenticator is enabled in app's MFA configuration. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/send-mfa-email-otp-by-access-token/) - ``` + ```py access_token = "" #Required email_id = "" #Required @@ -2422,9 +2560,10 @@ result = loginradius.mfa.mfa_email_otp_by_access_token(access_token, email_id, e
MFA Resend Otp (GET)
+ This API is used to resending the verification OTP to the provided phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/resend-twofactorauthentication-otp/) - ``` + ```py second_factor_authentication_token = "" #Required sms_template2_f_a = "" #Optional @@ -2436,9 +2575,10 @@ result = loginradius.mfa.mfa_resend_otp(second_factor_authentication_token, sms_
MFA Backup Code by UID (GET)
+ This API is used to reset the backup codes on a given account via the UID. This API call will generate 10 new codes, each code can only be consumed once. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-uid/) - ``` + ```py uid = "" #Required @@ -2449,9 +2589,10 @@ result = loginradius.mfa.mfa_backup_code_by_uid(uid)
MFA Reset Backup Code by UID (GET)
+ This API is used to reset the backup codes on a given account via the UID. This API call will generate 10 new codes, each code can only be consumed once. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-reset-backup-code-by-uid/) - ``` + ```py uid = "" #Required @@ -2462,9 +2603,10 @@ result = loginradius.mfa.mfa_reset_backup_code_by_uid(uid)
MFA Reset Google Authenticator by Token (DELETE)
+ This API Resets the Google Authenticator configurations on a given account via the access token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/google-authenticator/mfa-reset-google-authenticator-by-token/) - ``` + ```py access_token = "" #Required googleauthenticator = "True" #Required @@ -2476,9 +2618,10 @@ result = loginradius.mfa.mfa_reset_google_auth_by_token(access_token, googleauth
MFA Reset SMS Authenticator by Token (DELETE)
+ This API resets the SMS Authenticator configurations on a given account via the access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-reset-sms-authenticator-by-token/) - ``` + ```py access_token = "" #Required otpauthenticator = "True" #Required @@ -2490,9 +2633,10 @@ result = loginradius.mfa.mfa_reset_sms_auth_by_token(access_token, otpauthentica
Reset MFA Email OTP Authenticator By Access Token (DELETE)
+ This API is used to reset the Email OTP Authenticator settings for an MFA-enabled user [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/reset-mfa-email-otp-authenticator-access-token/) - ``` + ```py access_token = "" #Required @@ -2503,9 +2647,10 @@ result = loginradius.mfa.mfa_reset_email_otp_authenticator_by_access_token(acces
MFA Reset Security Question Authenticator By Access Token (DELETE)
+ This API is used to Reset MFA Security Question Authenticator By Access Token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/reset-mfa-security-question-by-access-token/) - ``` + ```py access_token = "" #Required @@ -2516,9 +2661,10 @@ result = loginradius.mfa.mfa_reset_security_question_authenticator_by_access_tok
MFA Reset SMS Authenticator By UID (DELETE)
+ This API resets the SMS Authenticator configurations on a given account via the UID. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-reset-sms-authenticator-by-uid/) - ``` + ```py otpauthenticator = "True" #Required uid = "" #Required @@ -2530,9 +2676,10 @@ result = loginradius.mfa.mfa_reset_sms_authenticator_by_uid(otpauthenticator, ui
MFA Reset Google Authenticator By UID (DELETE)
+ This API resets the Google Authenticator configurations on a given account via the UID. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/google-authenticator/mfa-reset-google-authenticator-by-uid/) - ``` + ```py googleauthenticator = "True" #Required uid = "" #Required @@ -2544,9 +2691,10 @@ result = loginradius.mfa.mfa_reset_google_authenticator_by_uid(googleauthenticat
Reset MFA Email OTP Authenticator Settings by Uid (DELETE)
+ This API is used to reset the Email OTP Authenticator settings for an MFA-enabled user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/reset-mfa-email-otp-authenticator-settings-by-uid/) - ``` + ```py uid = "" #Required @@ -2557,9 +2705,10 @@ result = loginradius.mfa.mfa_reset_email_otp_authenticator_by_uid(uid)
Reset MFA Security Question Authenticator Settings by Uid (DELETE)
+ This API is used to reset the Security Question Authenticator settings for an MFA-enabled user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/reset-mfa-security-question-authenticator-settings-by-uid/) - ``` + ```py uid = "" #Required @@ -2595,9 +2744,10 @@ List of APIs in this Section:
Reset PIN By ResetToken (PUT)
+ This API is used to reset pin using reset token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-resettoken/) - ``` + ```py reset_pin_by_reset_token = { "pin" : "", @@ -2611,9 +2761,10 @@ result = loginradius.pin_authentication.reset_pin_by_reset_token(reset_pin_by_re
Reset PIN By SecurityAnswer And Email (PUT)
+ This API is used to reset pin using security question answer and email. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-email/) - ``` + ```py reset_pin_by_security_question_answer_and_email_model = { "email" : "", @@ -2628,9 +2779,10 @@ result = loginradius.pin_authentication.reset_pin_by_email_and_security_answer(r
Reset PIN By SecurityAnswer And Username (PUT)
+ This API is used to reset pin using security question answer and username. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-username/) - ``` + ```py reset_pin_by_security_question_answer_and_username_model = { "pin" : "", @@ -2645,9 +2797,10 @@ result = loginradius.pin_authentication.reset_pin_by_username_and_security_answe
Reset PIN By SecurityAnswer And Phone (PUT)
+ This API is used to reset pin using security question answer and phone. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-phone/) - ``` + ```py reset_pin_by_security_question_answer_and_phone_model = { "phone" : "", @@ -2662,9 +2815,10 @@ result = loginradius.pin_authentication.reset_pin_by_phone_and_security_answer(r
Change PIN By Token (PUT)
+ This API is used to change a user's PIN using access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/change-pin-by-access-token/) - ``` + ```py access_token = "" #Required change_pin_model = { @@ -2679,9 +2833,10 @@ result = loginradius.pin_authentication.change_pin_by_access_token(access_token,
Reset PIN by Phone and OTP (PUT)
+ This API is used to reset pin using phoneId and OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-phone-and-otp/) - ``` + ```py reset_pin_by_phone_and_otp_model = { "otp" : "", @@ -2696,9 +2851,10 @@ result = loginradius.pin_authentication.reset_pin_by_phone_and_otp(reset_pin_by_
Reset PIN by Email and OTP (PUT)
+ This API is used to reset pin using email and OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-email-and-otp/) - ``` + ```py reset_pin_by_email_and_otp_model = { "email" : "", @@ -2713,9 +2869,10 @@ result = loginradius.pin_authentication.reset_pin_by_email_and_otp(reset_pin_by_
Reset PIN by Username and OTP (PUT)
+ This API is used to reset pin using username and OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-username-and-otp/) - ``` + ```py reset_pin_by_username_and_otp_model = { "otp" : "", @@ -2730,9 +2887,10 @@ result = loginradius.pin_authentication.reset_pin_by_username_and_otp(reset_pin_
PIN Login (POST)
+ This API is used to login a user by pin and session token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/login-by-pin/) - ``` + ```py login_by_pin_model = { "pin" : "" @@ -2746,9 +2904,10 @@ result = loginradius.pin_authentication.pin_login(login_by_pin_model, session_to
Forgot PIN By Email (POST)
+ This API sends the reset pin email to specified email address. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-email/) - ``` + ```py forgot_pin_link_by_email_model = { "email" : "" @@ -2763,9 +2922,10 @@ result = loginradius.pin_authentication.send_forgot_pin_email_by_email(forgot_pi
Forgot PIN By UserName (POST)
+ This API sends the reset pin email using username. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-username/) - ``` + ```py forgot_pin_link_by_user_name_model = { "userName" : "" @@ -2780,9 +2940,10 @@ result = loginradius.pin_authentication.send_forgot_pin_email_by_username(forgot
Forgot PIN By Phone (POST)
+ This API sends the OTP to specified phone number [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-phone/) - ``` + ```py forgot_pin_otp_by_phone_model = { "phone" : "" @@ -2796,9 +2957,10 @@ result = loginradius.pin_authentication.send_forgot_pin_sms_by_phone(forgot_pin_
Set PIN By PinAuthToken (POST)
+ This API is used to change a user's PIN using Pin Auth token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/set-pin-by-pinauthtoken/) - ``` + ```py pin_required_model = { "pin" : "" @@ -2812,9 +2974,10 @@ result = loginradius.pin_authentication.set_pin_by_pin_auth_token(pin_required_m
Invalidate PIN Session Token (GET)
+ This API is used to invalidate pin session token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/invalidate-pin-session-token/) - ``` + ```py session_token = "" #Required @@ -2848,9 +3011,10 @@ List of APIs in this Section:
Validate MFA by OTP (PUT)
+ This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-otp/) - ``` + ```py access_token = "" #Required reauth_by_otp_model = { @@ -2864,9 +3028,10 @@ result = loginradius.re_authentication.mfa_re_authenticate_by_otp(access_token,
Validate MFA by Backup Code (PUT)
+ This API is used to re-authenticate by set of backup codes via access token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-backup-code/) - ``` + ```py access_token = "" #Required reauth_by_backup_code_model = { @@ -2880,9 +3045,10 @@ result = loginradius.re_authentication.mfa_re_authenticate_by_backup_code(access
Validate MFA by Google Authenticator Code (PUT)
+ This API is used to re-authenticate via Multi-factor-authentication by passing the google authenticator code [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-google-authenticator-code) - ``` + ```py access_token = "" #Required reauth_by_google_authenticator_code_model = { @@ -2896,9 +3062,10 @@ result = loginradius.re_authentication.mfa_re_authenticate_by_google_auth(access
Validate MFA by Password (PUT)
+ This API is used to re-authenticate via Multi-factor-authentication by passing the password [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-password) - ``` + ```py access_token = "" #Required password_event_based_auth_model_with_lockout = { @@ -2913,9 +3080,10 @@ result = loginradius.re_authentication.mfa_re_authenticate_by_password(access_to
MFA Re-authentication by PIN (PUT)
+ This API is used to validate the triggered MFA authentication flow with a password. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/pin/re-auth-by-pin/) - ``` + ```py access_token = "" #Required pin_auth_event_based_auth_model_with_lockout = { @@ -2930,9 +3098,10 @@ result = loginradius.re_authentication.verify_pin_authentication(access_token, p
MFA Re-authentication by Email OTP (PUT)
+ This API is used to validate the triggered MFA authentication flow with an Email OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/mfa-re-auth-by-email-otp/) - ``` + ```py access_token = "" #Required reauth_by_email_otp_model = { @@ -2947,9 +3116,10 @@ result = loginradius.re_authentication.re_auth_validate_email_otp(access_token,
Verify Multifactor OTP Authentication (POST)
+ This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by OTP. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-validate-mfa/) - ``` + ```py event_based_multi_factor_token = { "secondFactorValidationToken" : "" @@ -2963,9 +3133,10 @@ result = loginradius.re_authentication.verify_multi_factor_otp_reauthentication(
Verify Multifactor Password Authentication (POST)
+ This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by password. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/re-auth-validate-password/) - ``` + ```py event_based_multi_factor_token = { "secondFactorValidationToken" : "" @@ -2979,9 +3150,10 @@ result = loginradius.re_authentication.verify_multi_factor_password_reauthentica
Verify Multifactor PIN Authentication (POST)
+ This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by PIN. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/pin/re-auth-validate-pin/) - ``` + ```py event_based_multi_factor_token = { "secondFactorValidationToken" : "" @@ -2995,9 +3167,10 @@ result = loginradius.re_authentication.verify_multi_factor_pin_reauthentication(
MFA Re-authentication by Security Question (POST)
+ This API is used to validate the triggered MFA re-authentication flow with security questions answers. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/mfa-re-authentication-by-security-question/) - ``` + ```py access_token = "" #Required security_question_answer_update_model = { @@ -3016,9 +3189,10 @@ result = loginradius.re_authentication.re_auth_by_security_question(access_token
Multi Factor Re-Authenticate (GET)
+ This API is used to trigger the Multi-Factor Autentication workflow for the provided access token [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-trigger/) - ``` + ```py access_token = "" #Required sms_template2_f_a = "" #Optional @@ -3030,9 +3204,10 @@ result = loginradius.re_authentication.mfa_re_authenticate(access_token, sms_tem
Send MFA Re-auth Email OTP by Access Token (GET)
+ This API is used to send the MFA Email OTP to the email for Re-authentication [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/send-mfa-re-auth-email-otp-by-access-token/) - ``` + ```py access_token = "" #Required email_id = "" #Required @@ -3062,9 +3237,10 @@ List of APIs in this Section:
Update Consent By Access Token (PUT)
+ This API is to update consents using access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/update-consent-by-access-token/) - ``` + ```py access_token = "" #Required consent_update_model = { @@ -3081,9 +3257,10 @@ result = loginradius.consent_management.update_consent_profile_by_access_token(a
Consent By ConsentToken (POST)
+ This API is to submit consent form using consent token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-by-consent-token/) - ``` + ```py consent_token = "" #Required consent_submit_model = { @@ -3104,9 +3281,10 @@ result = loginradius.consent_management.submit_consent_by_consent_token(consent_
Post Consent By Access Token (POST)
+ API to provide a way to end user to submit a consent form for particular event type. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-by-access-token/) - ``` + ```py access_token = "" #Required consent_submit_model = { @@ -3127,9 +3305,10 @@ result = loginradius.consent_management.submit_consent_by_access_token(access_to
Get Consent Logs By Uid (GET)
+ This API is used to get the Consent logs of the user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-uid/) - ``` + ```py uid = "" #Required @@ -3140,9 +3319,10 @@ result = loginradius.consent_management.get_consent_logs_by_uid(uid)
Get Consent Log by Access Token (GET)
+ This API is used to fetch consent logs. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-access-token/) - ``` + ```py access_token = "" #Required @@ -3153,9 +3333,10 @@ result = loginradius.consent_management.get_consent_logs(access_token)
Get Verify Consent By Access Token (GET)
+ This API is used to check if consent is submitted for a particular event or not. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/verify-consent-by-access-token/) - ``` + ```py access_token = "" #Required event = "" #Required @@ -3183,9 +3364,10 @@ List of APIs in this Section:
Smart Login Verify Token (GET)
+ This API verifies the provided token for Smart Login [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-verify-token/) - ``` + ```py verification_token = "" #Required welcome_email_template = "" #Optional @@ -3197,9 +3379,10 @@ result = loginradius.smart_login.smart_login_token_verification(verification_tok
Smart Login By Email (GET)
+ This API sends a Smart Login link to the user's Email Id. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-by-email) - ``` + ```py client_guid = "" #Required email = "" #Required @@ -3214,9 +3397,10 @@ result = loginradius.smart_login.smart_login_by_email(client_guid, email, redire
Smart Login By Username (GET)
+ This API sends a Smart Login link to the user's Email Id. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-by-username) - ``` + ```py client_guid = "" #Required username = "" #Required @@ -3231,9 +3415,10 @@ result = loginradius.smart_login.smart_login_by_user_name(client_guid, username,
Smart Login Ping (GET)
+ This API is used to check if the Smart Login link has been clicked or not [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-ping) - ``` + ```py client_guid = "" #Required fields = "" #Optional @@ -3261,9 +3446,10 @@ List of APIs in this Section:
One Touch OTP Verification (PUT)
+ This API is used to verify the otp for One Touch Login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-otp-verification/) - ``` + ```py otp = "" #Required phone = "" #Required @@ -3277,9 +3463,10 @@ result = loginradius.one_touch_login.one_touch_login_otp_verification(otp, phone
One Touch Login by Email (POST)
+ This API is used to send a link to a specified email for a frictionless login/registration [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-login-by-email-captcha/) - ``` + ```py one_touch_login_by_email_model = { "clientguid" : "", @@ -3297,9 +3484,10 @@ result = loginradius.one_touch_login.one_touch_login_by_email(one_touch_login_by
One Touch Login by Phone (POST)
+ This API is used to send one time password to a given phone number for a frictionless login/registration. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-login-by-phone-captcha/) - ``` + ```py one_touch_login_by_phone_model = { "g-recaptcha-response" : "", @@ -3314,9 +3502,10 @@ result = loginradius.one_touch_login.one_touch_login_by_phone(one_touch_login_by
One Touch Email Verification (GET)
+ This API verifies the provided token for One Touch Login [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-email-verification) - ``` + ```py verification_token = "" #Required welcome_email_template = "" #Optional @@ -3328,9 +3517,10 @@ result = loginradius.one_touch_login.one_touch_email_verification(verification_t
One Touch Login Ping (GET)
+ This API is used to check if the One Touch Login link has been clicked or not. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-login-ping/) - ``` + ```py client_guid = "" #Required fields = "" #Optional @@ -3360,9 +3550,10 @@ List of APIs in this Section:
Passwordless Login Phone Verification (PUT)
+ This API verifies an account by OTP and allows the customer to login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-phone-verification) - ``` + ```py password_less_login_otp_model = { "otp" : "", @@ -3376,9 +3567,10 @@ result = loginradius.password_less_login.passwordless_login_phone_verification(p
Passwordless Login Verification By Email And OTP (POST)
+ This API is used to verify the otp sent to the email when doing a passwordless login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-verify-by-email-and-otp/) - ``` + ```py password_less_login_by_email_and_otp_model = { "email": "", @@ -3393,9 +3585,10 @@ result = loginradius.password_less_login.passwordless_login_verification_by_emai
Passwordless Login Verification By User Name And OTP (POST)
+ This API is used to verify the otp sent to the email when doing a passwordless login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-verify-by-username-and-otp/) - ``` + ```py password_less_login_by_user_name_and_otp_model = { "username": "", @@ -3410,9 +3603,10 @@ result = loginradius.password_less_login.passwordless_login_verification_by_user
Passwordless Login by Phone (GET)
+ API can be used to send a One-time Passcode (OTP) provided that the account has a verified PhoneID [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-by-phone) - ``` + ```py phone = "" #Required sms_template = "" #Optional @@ -3424,9 +3618,10 @@ result = loginradius.password_less_login.passwordless_login_by_phone(phone, sms_
Passwordless Login By Email (GET)
+ This API is used to send a Passwordless Login verification link to the provided Email ID [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-by-email) - ``` + ```py email = "" #Required password_less_login_template = "" #Optional @@ -3439,9 +3634,10 @@ result = loginradius.password_less_login.passwordless_login_by_email(email, pass
Passwordless Login By UserName (GET)
+ This API is used to send a Passwordless Login Verification Link to a customer by providing their UserName [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-by-username) - ``` + ```py username = "" #Required password_less_login_template = "" #Optional @@ -3454,9 +3650,10 @@ result = loginradius.password_less_login.passwordless_login_by_user_name(usernam
Passwordless Login Verification (GET)
+ This API is used to verify the Passwordless Login verification link. Note: If you are using Passwordless Login by Phone you will need to use the Passwordless Login Phone Verification API [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-verification) - ``` + ```py verification_token = "" #Required fields = "" #Optional @@ -3481,18 +3678,20 @@ List of APIs in this Section:
Get Server Time (GET)
+ This API allows you to query your LoginRadius account for basic server information and server time information which is useful when generating an SOTT token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/configuration/get-server-time/) - ``` + ```py time_difference = 0 #Optional result = loginradius.configuration.get_server_info(time_difference) ```
Get Configuration (GET)
+ This API is used to get the configurations which are set in the LoginRadius Admin Console for a particular LoginRadius site/environment. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/configuration/get-configurations) - ``` + ```py result = loginradius.configuration.get_configurations() ``` @@ -3522,9 +3721,10 @@ List of APIs in this Section:
Assign Roles by UID (PUT)
+ This API is used to assign your desired roles to a given user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/assign-roles-by-uid/) - ``` + ```py account_roles_model = { "roles" : [ "roles" ] @@ -3538,9 +3738,10 @@ result = loginradius.role.assign_roles_by_uid(account_roles_model, uid)
Upsert Context (PUT)
+ This API creates a Context with a set of Roles [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/upsert-context) - ``` + ```py account_role_context_model = { "roleContext" : [ { @@ -3559,9 +3760,10 @@ result = loginradius.role.update_role_context_by_uid(account_role_context_model,
Add Permissions to Role (PUT)
+ This API is used to add permissions to a given role. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/add-permissions-to-role) - ``` + ```py permissions_model = { "permissions" : [ "permissions" ] @@ -3575,9 +3777,10 @@ result = loginradius.role.add_role_permissions(permissions_model, role)
Roles Create (POST)
+ This API creates a role with permissions. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/roles-create) - ``` + ```py roles_model = { "roles" : [ { @@ -3593,9 +3796,10 @@ result = loginradius.role.create_roles(roles_model)
Roles by UID (GET)
+ API is used to retrieve all the assigned roles of a particular User. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/get-roles-by-uid) - ``` + ```py uid = "" #Required @@ -3606,9 +3810,10 @@ result = loginradius.role.get_roles_by_uid(uid)
Get Context with Roles and Permissions (GET)
+ This API Gets the contexts that have been configured and the associated roles and permissions. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/get-context) - ``` + ```py uid = "" #Required @@ -3619,9 +3824,10 @@ result = loginradius.role.get_role_context_by_uid(uid)
Role Context profile (GET)
+ The API is used to retrieve role context by the context name. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/role-context-profile/) - ``` + ```py context_name = "" #Required @@ -3632,9 +3838,10 @@ result = loginradius.role.get_role_context_by_context_name(context_name)
Roles List (GET)
+ This API retrieves the complete list of created roles with permissions of your app. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/roles-list) - ``` + ```py result = loginradius.role.get_roles_list() @@ -3644,9 +3851,10 @@ result = loginradius.role.get_roles_list()
Unassign Roles by UID (DELETE)
+ This API is used to unassign roles from a user. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/unassign-roles-by-uid) - ``` + ```py account_roles_model = { "roles" : [ "roles" ] @@ -3660,9 +3868,10 @@ result = loginradius.role.unassign_roles_by_uid(account_roles_model, uid)
Delete Role Context (DELETE)
+ This API Deletes the specified Role Context [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-context) - ``` + ```py context_name = "" #Required uid = "" #Required @@ -3674,9 +3883,10 @@ result = loginradius.role.delete_role_context_by_uid(context_name, uid)
Delete Role from Context (DELETE)
+ This API Deletes the specified Role from a Context. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-role-from-context/) - ``` + ```py context_name = "" #Required role_context_remove_role_model = { @@ -3691,9 +3901,10 @@ result = loginradius.role.delete_roles_from_role_context_by_uid(context_name, ro
Delete Additional Permission from Context (DELETE)
+ This API Deletes Additional Permissions from Context. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-permissions-from-context) - ``` + ```py context_name = "" #Required role_context_additional_permission_remove_role_model = { @@ -3708,9 +3919,10 @@ result = loginradius.role.delete_additional_permission_from_role_context_by_uid(
Account Delete Role (DELETE)
+ This API is used to delete the role. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-role) - ``` + ```py role = "" #Required @@ -3721,9 +3933,10 @@ result = loginradius.role.delete_role(role)
Remove Permissions (DELETE)
+ API is used to remove permissions from a role. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/remove-permissions) - ``` + ```py permissions_model = { "permissions" : [ "permissions" ] @@ -3755,9 +3968,10 @@ List of APIs in this Section:
Update Registration Data (PUT)
+ This API allows you to update a dropdown item [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/update-registration-data) - ``` + ```py registration_data_update_model = { "isActive" : "True", @@ -3774,9 +3988,10 @@ result = loginradius.custom_registration_data.update_registration_data(registrat
Validate secret code (POST)
+ This API allows you to validate code for a particular dropdown member. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/validate-code) - ``` + ```py code = "" #Required record_id = "" #Required @@ -3788,9 +4003,10 @@ result = loginradius.custom_registration_data.validate_registration_data_code(co
Add Registration Data (POST)
+ This API allows you to fill data into a dropdown list which you have created for user Registration. For more details on how to use this API please see our Custom Registration Data Overview [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/add-registration-data) - ``` + ```py registration_data_create_model_list = { "data" : [ { @@ -3810,9 +4026,10 @@ result = loginradius.custom_registration_data.add_registration_data(registration
Auth Get Registration Data Server (GET)
+ This API is used to retrieve dropdown data. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/auth-get-registration-data) - ``` + ```py type = "" #Required limit = 0 #Optional @@ -3826,9 +4043,10 @@ result = loginradius.custom_registration_data.auth_get_registration_data(type, l
Get Registration Data (GET)
+ This API is used to retrieve dropdown data. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/get-registration-data) - ``` + ```py type = "" #Required limit = 0 #Optional @@ -3842,9 +4060,10 @@ result = loginradius.custom_registration_data.get_registration_data(type, limit,
Delete Registration Data (DELETE)
+ This API allows you to delete an item from a dropdown list. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/delete-registration-data) - ``` + ```py record_id = "" #Required @@ -3855,9 +4074,10 @@ result = loginradius.custom_registration_data.delete_registration_data(record_id
Delete All Records by Datasource (DELETE)
+ This API allows you to delete all records contained in a datasource. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-registration-data/delete-all-records-by-datasource) - ``` + ```py type = "" #Required @@ -3882,9 +4102,10 @@ List of APIs in this Section:
Risk Based Authentication Login by Email (POST)
+ This API retrieves a copy of the user data based on the Email [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-email) - ``` + ```py email_authentication_model = { "email" : "", @@ -3915,9 +4136,10 @@ result = loginradius.risk_based_authentication.rba_login_by_email(email_authenti
Risk Based Authentication Login by Username (POST)
+ This API retrieves a copy of the user data based on the Username [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-username) - ``` + ```py user_name_authentication_model = { "password" : "", @@ -3948,9 +4170,10 @@ result = loginradius.risk_based_authentication.rba_login_by_user_name(user_name_
Risk Based Authentication Phone Login (POST)
+ This API retrieves a copy of the user data based on the Phone [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-login) - ``` + ```py phone_authentication_model = { "password" : "", @@ -3993,9 +4216,10 @@ List of APIs in this Section:
Generate SOTT (GET)
+ This API allows you to generate SOTT with a given expiration time. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/session/generate-sott-token) - ``` + ```py time_difference = 0 #Optional @@ -4027,9 +4251,10 @@ List of APIs in this Section:
Access Token via Facebook Token (GET)
+ The API is used to get LoginRadius access token by sending Facebook's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-facebook-token/) - ``` + ```py fb_access_token = "" #Required social_app_name = "" #Optional @@ -4041,9 +4266,10 @@ result = loginradius.native_social.get_access_token_by_facebook_access_token(fb_
Access Token via Twitter Token (GET)
+ The API is used to get LoginRadius access token by sending Twitter's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-twitter-token) - ``` + ```py tw_access_token = "" #Required tw_token_secret = "" #Required @@ -4056,9 +4282,10 @@ result = loginradius.native_social.get_access_token_by_twitter_access_token(tw_a
Access Token via Google Token (GET)
+ The API is used to get LoginRadius access token by sending Google's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-token) - ``` + ```py google_access_token = "" #Required client_id = "" #Optional @@ -4072,9 +4299,10 @@ result = loginradius.native_social.get_access_token_by_google_access_token(googl
Access Token using google JWT token for Native Mobile Login (GET)
+ This API is used to Get LoginRadius Access Token using google jwt id token for google native mobile login/registration. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-googlejwt) - ``` + ```py id_token = "" #Required @@ -4085,9 +4313,10 @@ result = loginradius.native_social.get_access_token_by_google_j_w_t_access_token
Access Token via Linkedin Token (GET)
+ The API is used to get LoginRadius access token by sending Linkedin's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-linkedin-token/) - ``` + ```py ln_access_token = "" #Required social_app_name = "" #Optional @@ -4099,9 +4328,10 @@ result = loginradius.native_social.get_access_token_by_linkedin_access_token(ln_
Get Access Token By Foursquare Access Token (GET)
+ The API is used to get LoginRadius access token by sending Foursquare's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-foursquare-token/) - ``` + ```py fs_access_token = "" #Required @@ -4112,9 +4342,10 @@ result = loginradius.native_social.get_access_token_by_foursquare_access_token(f
Access Token via Apple Id Code (GET)
+ The API is used to get LoginRadius access token by sending a valid Apple ID OAuth Code. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-apple-id-code) - ``` + ```py code = "" #Required social_app_name = "" #Optional @@ -4126,9 +4357,10 @@ result = loginradius.native_social.get_access_token_by_apple_id_code(code, socia
Access Token via WeChat Code (GET)
+ This API is used to retrieve a LoginRadius access token by passing in a valid WeChat OAuth Code. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-wechat-code) - ``` + ```py code = "" #Required @@ -4139,9 +4371,10 @@ result = loginradius.native_social.get_access_token_by_we_chat_code(code)
Access Token via Vkontakte Token (GET)
+ The API is used to get LoginRadius access token by sending Vkontakte's access token. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-vkontakte-token) - ``` + ```py vk_access_token = "" #Required @@ -4152,9 +4385,10 @@ result = loginradius.native_social.get_access_token_by_vkontakte_access_token(vk
Access Token via Google AuthCode (GET)
+ The API is used to get LoginRadius access token by sending Google's AuthCode. It will be valid for the specific duration of time specified in the response. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-auth-code) - ``` + ```py google_authcode = "" #Required social_app_name = "" #Optional @@ -4181,9 +4415,10 @@ List of APIs in this Section:
Webhook Subscribe (POST)
+ 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) - ``` + ```py web_hook_subscribe_model = { "event" : "", @@ -4197,9 +4432,10 @@ result = loginradius.web_hook.web_hook_subscribe(web_hook_subscribe_model)
Webhook Subscribed URLs (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) - ``` + ```py event = "" #Required @@ -4210,9 +4446,10 @@ result = loginradius.web_hook.get_web_hook_subscribed_u_r_ls(event)
Webhook Test (GET)
+ API can be used to test a subscribed WebHook. [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/webhook-test) - ``` + ```py result = loginradius.web_hook.webhook_test() @@ -4222,9 +4459,10 @@ result = loginradius.web_hook.webhook_test()
WebHook Unsubscribe (DELETE)
+ 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) - ``` + ```py web_hook_subscribe_model = { "event" : "", @@ -4242,7 +4480,7 @@ result = loginradius.web_hook.web_hook_unsubscribe(web_hook_subscribe_model) #### Error Handling If the request fails, it can be handled in the following way: -``` +```py if result.get('ErrorCode') is not None: print(result.get('Description')) else: @@ -4256,7 +4494,14 @@ else: SOTT is a secure one-time token that can be created using the API key, API secret, and a timestamp ( start time and end time ). You can manually create a SOTT using the following utility function. -``` + +```py +startTime="2022-01-16 12:00:00" #(Optional) // Valid Start Date with Date and time + +endTime="2022-03-16 12:15:00" #(Optional) // Valid End Date with Date and time + +#do not pass the time difference if you are passing startTime & endTime. + timeDifference='10' #(Optional) The time difference will be used to set the expiration time of SOTT, If you do not pass time difference then the default expiration time of SOTT is 10 minutes. getLRserverTime=False #(Optional) If True it will call LoginRadius Get Server Time Api and fetch basic server information and server time information which is useful when generating an SOTT token. @@ -4268,7 +4513,7 @@ apiKey="" #(Optional) LoginRadius Api Key. apiSecret = "" # (Optional) LoginRadius Api Secret (Only Primary Api Secret is used to generate the SOTT manually). -sott_data = loginradius.get_sott(timeDifference, getLRserverTime,apiKey,apiSecret) +sott_data = loginradius.get_sott(timeDifference, getLRserverTime,apiKey,apiSecret,startTime,endTime) print(sott_data) ``` diff --git a/demo/LoginRadius/__init__.py b/demo/LoginRadius/__init__.py index 4780a79..4d25ef9 100644 --- a/demo/LoginRadius/__init__.py +++ b/demo/LoginRadius/__init__.py @@ -9,7 +9,7 @@ # premium or enterprise members only. # # In which case, an exception will be raised. # ################################################# -# Copyright 2019 LoginRadius Inc. # +# Copyright 2022 LoginRadius Inc. # # - www.LoginRadius.com # ################################################# # This file is part of the LoginRadius SDK # @@ -17,10 +17,10 @@ ################################################# __author__ = "LoginRadius" -__copyright__ = "Copyright 2019, LoginRadius" +__copyright__ = "Copyright 2022, LoginRadius" __email__ = "developers@loginradius.com" __status__ = "Production" -__version__ = "11.3.0" +__version__ = "11.4.0" import json import sys @@ -156,10 +156,9 @@ def __init__(self): self.social = SocialApi(self) if sys.version_info[0] < 3: from urllib import quote - self.quote = quote else: from urllib.parse import quote - self.quote = quote + self.quote = quote # # Internal private functions @@ -167,20 +166,19 @@ def __init__(self): def _settings(self, library): """This sets the name tuple settings to whatever library you want. You may change this as you wish.""" - if LoginRadius.LIBRARY is not None: + if not self.is_null_or_whitespace(LoginRadius.LIBRARY): if LoginRadius.LIBRARY == "requests": self._set_requests() elif LoginRadius.LIBRARY == "urllib3": self._set_urllib3() else: raise Exceptions.InvalidLibrary(LoginRadius.LIBRARY) + elif library == "requests": + self._set_requests() + elif library == "urllib3": + self._set_urllib3() else: - if library == "requests": - self._set_requests() - elif library == "urllib3": - self._set_urllib3() - else: - raise Exceptions.InvalidLibrary(library) + raise Exceptions.InvalidLibrary(library) def _set_requests(self): """Change to the requests library to use.""" @@ -278,17 +276,17 @@ def execute(self, method, resource_url, query_params, payload): except IOError as e: return { 'ErrorCode': 105, - 'Description': e.message + 'Description': str(e) } except ValueError as e: return { 'ErrorCode': 102, - 'Description': e.message + 'Description': str(e) } except Exception as e: return { 'ErrorCode': 101, - 'Description': e.message + 'Description': str(e) } def _get_json(self, url, payload, HEADERS): @@ -304,7 +302,7 @@ def _get_json(self, url, payload, HEADERS): else: return self._process_result(r.json()) else: - if not len(proxies) == 0: + if len(proxies) != 0: http = urllib3.ProxyManager(proxies['https']) else: http = urllib3.PoolManager() @@ -318,8 +316,8 @@ def _get_json(self, url, payload, HEADERS): def __submit_json(self, method, url, payload, HEADERS): proxies = self._get_proxy() + import json if self.settings.requests: - import json if method == 'PUT': r = self.settings.requests.put( url, proxies=proxies, data=json.dumps(payload), headers=HEADERS) @@ -336,8 +334,7 @@ def __submit_json(self, method, url, payload, HEADERS): return self._process_result(r.json()) else: - import json - if not len(proxies) == 0: + if len(proxies) != 0: http = urllib3.ProxyManager(proxies['https']) else: http = urllib3.PoolManager() @@ -393,7 +390,7 @@ def get_validation_message(self, field): # # Function to generate SOTT manually # - def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecret=""): + def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecret="", startTime="", endTime=""): time = '10' secret = self.API_SECRET @@ -414,7 +411,10 @@ def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecre now = now.strftime("%Y/%m/%d %I:%M:%S") now_plus_10m = now_plus_10m.strftime("%Y/%m/%d %I:%M:%S") - if getLRserverTime: + if(not self.is_null_or_whitespace(startTime) and not self.is_null_or_whitespace(endTime)): + now = startTime + now_plus_10m = endTime + elif getLRserverTime: result = self.configuration.get_server_info(time) if result.get('Sott') is not None: Sott = result.get('Sott') @@ -423,7 +423,6 @@ def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecre now = val if timeKey == 'EndTime': now_plus_10m = val - plaintext = now + "#" + key + "#" + now_plus_10m padding = 16 - (len(plaintext) % 16) if sys.version_info[0] == 3: diff --git a/lib/LoginRadius/__init__.py b/lib/LoginRadius/__init__.py index d7db476..48191ba 100644 --- a/lib/LoginRadius/__init__.py +++ b/lib/LoginRadius/__init__.py @@ -9,7 +9,7 @@ # premium or enterprise members only. # # In which case, an exception will be raised. # ################################################# -# Copyright 2019 LoginRadius Inc. # +# Copyright 2022 LoginRadius Inc. # # - www.LoginRadius.com # ################################################# # This file is part of the LoginRadius SDK # @@ -17,10 +17,10 @@ ################################################# __author__ = "LoginRadius" -__copyright__ = "Copyright 2019, LoginRadius" +__copyright__ = "Copyright 2022, LoginRadius" __email__ = "developers@loginradius.com" __status__ = "Production" -__version__ = "11.3.0" +__version__ = "11.4.0" import json import sys @@ -156,10 +156,9 @@ def __init__(self): self.social = SocialApi(self) if sys.version_info[0] < 3: from urllib import quote - self.quote = quote else: from urllib.parse import quote - self.quote = quote + self.quote = quote # # Internal private functions @@ -167,20 +166,19 @@ def __init__(self): def _settings(self, library): """This sets the name tuple settings to whatever library you want. You may change this as you wish.""" - if LoginRadius.LIBRARY is not None: + if not self.is_null_or_whitespace(LoginRadius.LIBRARY): if LoginRadius.LIBRARY == "requests": self._set_requests() elif LoginRadius.LIBRARY == "urllib3": self._set_urllib3() else: raise Exceptions.InvalidLibrary(LoginRadius.LIBRARY) + elif library == "requests": + self._set_requests() + elif library == "urllib3": + self._set_urllib3() else: - if library == "requests": - self._set_requests() - elif library == "urllib3": - self._set_urllib3() - else: - raise Exceptions.InvalidLibrary(library) + raise Exceptions.InvalidLibrary(library) def _set_requests(self): """Change to the requests library to use.""" @@ -276,17 +274,17 @@ def execute(self, method, resource_url, query_params, payload): except IOError as e: return { 'ErrorCode': 105, - 'Description': e.message + 'Description': str(e) } except ValueError as e: return { 'ErrorCode': 102, - 'Description': e.message + 'Description': str(e) } except Exception as e: return { 'ErrorCode': 101, - 'Description': e.message + 'Description': str(e) } def _get_json(self, url, payload, HEADERS): @@ -302,7 +300,7 @@ def _get_json(self, url, payload, HEADERS): else: return self._process_result(r.json()) else: - if not len(proxies) == 0: + if len(proxies) != 0: http = urllib3.ProxyManager(proxies['https']) else: http = urllib3.PoolManager() @@ -316,8 +314,8 @@ def _get_json(self, url, payload, HEADERS): def __submit_json(self, method, url, payload, HEADERS): proxies = self._get_proxy() + import json if self.settings.requests: - import json if method == 'PUT': r = self.settings.requests.put( url, proxies=proxies, data=json.dumps(payload), headers=HEADERS) @@ -334,8 +332,7 @@ def __submit_json(self, method, url, payload, HEADERS): return self._process_result(r.json()) else: - import json - if not len(proxies) == 0: + if len(proxies) != 0: http = urllib3.ProxyManager(proxies['https']) else: http = urllib3.PoolManager() @@ -390,7 +387,7 @@ def get_validation_message(self, field): # # Function to generate SOTT manually # - def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecret=""): + def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecret="", startTime="", endTime=""): time = '10' secret = self.API_SECRET @@ -411,7 +408,10 @@ def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecre now = now.strftime("%Y/%m/%d %I:%M:%S") now_plus_10m = now_plus_10m.strftime("%Y/%m/%d %I:%M:%S") - if getLRserverTime: + if(not self.is_null_or_whitespace(startTime) and not self.is_null_or_whitespace(endTime)): + now = startTime + now_plus_10m = endTime + elif getLRserverTime: result = self.configuration.get_server_info(time) if result.get('Sott') is not None: Sott = result.get('Sott') @@ -420,7 +420,6 @@ def get_sott(self, timeDifference='', getLRserverTime=False, apiKey="", apiSecre now = val if timeKey == 'EndTime': now_plus_10m = val - plaintext = now + "#" + key + "#" + now_plus_10m padding = 16 - (len(plaintext) % 16) if sys.version_info[0] == 3: diff --git a/lib/README.md b/lib/README.md index de014e3..0900091 100644 --- a/lib/README.md +++ b/lib/README.md @@ -21,18 +21,28 @@ From Package Using pip ``` - pip install loginradius-v2==11.3.0 + pip install loginradius-v2==11.4.0 ``` or with easy_install ``` - easy_install loginradius-v2==11.3.0 + easy_install loginradius-v2==11.4.0 ``` Changelog ====== +11.4.0 +----------- +Release on **June 3, 2022** +## Enhancements + +- Added additional parameter `startTime` and `endTime` in LoginRadius manual SOTT generation method `get_sott()`. +- Enhancement in `README.md` file. +- Code optimization for better performance. + + 11.3.0 ----------- Release on **January 31, 2022** diff --git a/lib/setup.py b/lib/setup.py index e20d5cc..8e54298 100644 --- a/lib/setup.py +++ b/lib/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name = 'LoginRadius-v2', - version='11.3.0', + version='11.4.0', long_description=long_description, long_description_content_type='text/markdown', packages=setuptools.find_packages(),