LoginRadius Customer Registration wrapper provides access to LoginRadius Identity Management Platform API.
LoginRadius is an Identity Management Platform that simplifies user registration while securing data. LoginRadius Platform simplifies and secures your user registration process, increases conversion with Social Login that combines 30 major social platforms, and offers a full solution with Traditional Customer Registration. You can gather a wealth of user profile data from Social Login or Traditional Customer Registration.
LoginRadius centralizes it all in one place, making it easy to manage and access. Easily integrate LoginRadius with all of your third-party applications, like MailChimp, Google Analytics, Livefyre and many more, making it easy to utilize the data you are capturing.
LoginRadius helps businesses boost user engagement on their web/mobile platform, manage online identities, utilize social media for marketing, capture accurate consumer data, and get unique social insight into their customer base.
Please visit here for more information.
Welcome to LoginRadius Ruby SDK documentation!
Disclaimer This library is meant to help you with a quick implementation of the LoginRadius platform and also to serve as a reference point for the LoginRadius API. Keep in mind that it is an open source library, which means you are free to download and customize the library functions based on your specific application needs.
Add this line to your application's Gemfile:
gem "login_radius", :path => "gemfilepath";
Or
gem 'login_radius', '~> 11.5.0'
And then execute:
$ bundle
Or install it yourself as:
$ gem install login_radius
1)Before using any of the functions available in the library, its corresponding module must first define the global constant in config/application.yml
:
SITE_NAME: "<site name>"
API_KEY: "<api-key>"
API_SECRET: "<api-secret>"
CUSTOM_API_DOMAIN: "<custom-domain-url-if-any>"
API_REQUEST_SIGNING: "false"
To know your Site Name,API Key and Secret. Kindly follow the steps in the Document.
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.
Origin_IP: "<Client Ip Address>"
2)After define the configuration key details, its corresponding module must first be instantiated:
Create login_radius.rb
in /config/initializers
:
require 'login_radius'
::AccountApi = LoginRadius::AccountApi.new
::RoleApi = LoginRadius::RoleApi.new
::SottApi = LoginRadius::SottApi.new
::ConfigurationApi = LoginRadius::ConfigurationApi.new
::ConsentManagementApi = LoginRadius::ConsentManagementApi.new
::CustomObjectApi = LoginRadius::CustomObjectApi.new
::MultiFactorAuthenticationApi = LoginRadius::MultiFactorAuthenticationApi.new
::ReAuthenticationApi = LoginRadius::ReAuthenticationApi.new
::WebHookApi = LoginRadius::WebHookApi.new
::AuthenticationApi = LoginRadius::AuthenticationApi.new
::OneTouchLoginApi = LoginRadius::OneTouchLoginApi.new
::PasswordLessLoginApi = LoginRadius::PasswordLessLoginApi.new
::PhoneAuthenticationApi = LoginRadius::PhoneAuthenticationApi.new
::PINAuthenticationApi = LoginRadius::PINAuthenticationApi.new
::RiskBasedAuthenticationApi = LoginRadius::RiskBasedAuthenticationApi.new
::SmartLoginApi = LoginRadius::SmartLoginApi.new
::NativeSocialApi = LoginRadius::NativeSocialApi.new
::SocialApi = LoginRadius::SocialApi.new
Please note that you only have to initiate modules you need.
The API key and secret can be obtained from the LoginRadius Admin-console.
List of APIs in this Section:
- PUT : Auth Update Profile by Token
- PUT : Auth Unlock Account by Access Token
- PUT : Auth Verify Email By OTP
- PUT : Auth Reset Password by Security Answer and Email
- PUT : Auth Reset Password by Security Answer and Phone
- PUT : Auth Reset Password by Security Answer and UserName
- PUT : Auth Reset Password by Reset Token
- PUT : Auth Reset Password by OTP
- PUT : Auth Reset Password by OTP and UserName
- PUT : Auth Change Password
- PUT : Auth Set or Change UserName
- PUT : Auth Resend Email Verification
- POST : Auth Add Email
- POST : Auth Login by Email
- POST : Auth Login by Username
- POST : Auth Forgot Password
- POST : Auth Link Social Identities
- POST : Auth Link Social Identities By Ping
- POST : Auth User Registration by Email
- POST : Auth User Registration By Captcha
- GET : Get Security Questions By Email
- GET : Get Security Questions By UserName
- GET : Get Security Questions By Phone
- GET : Get Security Questions By Access Token
- GET : Auth Validate Access token
- GET : Access Token Invalidate
- GET : Access Token Info
- GET : Auth Read all Profiles by Token
- GET : Auth Send Welcome Email
- GET : Auth Delete Account
- GET : Get Profile By Ping
- GET : Auth Check Email Availability
- GET : Auth Verify Email
- GET : Auth Check UserName Availability
- GET : Auth Privacy Policy Accept
- GET : Auth Privacy Policy History By Access Token
- DELETE : Auth Delete Account with Email Confirmation
- DELETE : Auth Remove Email
- DELETE : Auth Unlink Social Identities
access_token = "<access_token>" #Required
user_profile_update_model ={
"firstName" => "<firstName>",
"lastName" => "<lastName>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
null_support = true #Optional
sms_template = "<sms_template>" #Optional
verification_url = "<verification_url>" #Optional
response = AuthenticationApi.update_profile_by_access_token(access_token, user_profile_update_model, email_template, fields, null_support, sms_template, verification_url)
access_token = "<access_token>" #Required
unlock_profile_model ={
"g-recaptcha-response" => "<g-recaptcha-response>"} #Required
response = AuthenticationApi.unlock_account_by_token(access_token, unlock_profile_model)
email_verification_by_otp_model ={
"email" => "<email>",
"otp" => "<otp>"} #Required
fields = nil #Optional
url = "<url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.verify_email_by_otp(email_verification_by_otp_model, fields, url, welcome_email_template)
reset_password_by_security_answer_and_email_model ={
"email" => "<email>",
"password" => "<password>",
"securityAnswer" => {"QuestionID"=>"Answer"}} #Required
response = AuthenticationApi.reset_password_by_security_answer_and_email(reset_password_by_security_answer_and_email_model)
reset_password_by_security_answer_and_phone_model ={
"password" => "<password>",
"phone" => "<phone>",
"securityAnswer" => {"QuestionID"=>"Answer"}} #Required
response = AuthenticationApi.reset_password_by_security_answer_and_phone(reset_password_by_security_answer_and_phone_model)
reset_password_by_security_answer_and_user_name_model ={
"password" => "<password>",
"securityAnswer" => {"QuestionID"=>"Answer"},
"userName" => "<userName>"} #Required
response = AuthenticationApi.reset_password_by_security_answer_and_user_name(reset_password_by_security_answer_and_user_name_model)
reset_password_by_reset_token_model ={
"password" => "<password>",
"resetToken" => "<resetToken>"} #Required
response = AuthenticationApi.reset_password_by_reset_token(reset_password_by_reset_token_model)
reset_password_by_email_and_otp_model ={
"email" => "<email>",
"otp" => "<otp>",
"password" => "<password>"} #Required
response = AuthenticationApi.reset_password_by_email_otp(reset_password_by_email_and_otp_model)
reset_password_by_user_name_model ={
"otp" => "<otp>",
"password" => "<password>",
"userName" => "<userName>"} #Required
response = AuthenticationApi.reset_password_by_otp_and_user_name(reset_password_by_user_name_model)
access_token = "<access_token>" #Required
new_password = "<new_password>" #Required
old_password = "<old_password>" #Required
response = AuthenticationApi.change_password(access_token, new_password, old_password)
access_token = "<access_token>" #Required
username = "<username>" #Required
response = AuthenticationApi.set_or_change_user_name(access_token, username)
email = "<email>" #Required
email_template = "<email_template>" #Optional
verification_url = "<verification_url>" #Optional
response = AuthenticationApi.auth_resend_email_verification(email, email_template, verification_url)
access_token = "<access_token>" #Required
email = "<email>" #Required
type = "<type>" #Required
email_template = "<email_template>" #Optional
verification_url = "<verification_url>" #Optional
response = AuthenticationApi.add_email(access_token, email, type, email_template, verification_url)
email_authentication_model ={
"email" => "<email>",
"password" => "<password>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
verification_url = "<verification_url>" #Optional
response = AuthenticationApi.login_by_email(email_authentication_model, email_template, fields, login_url, verification_url)
user_name_authentication_model ={
"password" => "<password>",
"username" => "<username>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
verification_url = "<verification_url>" #Optional
response = AuthenticationApi.login_by_user_name(user_name_authentication_model, email_template, fields, login_url, verification_url)
email = "<email>" #Required
reset_password_url = "<reset_password_url>" #Required
email_template = "<email_template>" #Optional
response = AuthenticationApi.forgot_password(email, reset_password_url, email_template)
access_token = "<access_token>" #Required
candidate_token = "<candidate_token>" #Required
response = AuthenticationApi.link_social_identities(access_token, candidate_token)
access_token = "<access_token>" #Required
client_guid = "<client_guid>" #Required
response = AuthenticationApi.link_social_identities_by_ping(access_token, client_guid)
auth_user_registration_model ={
"email" => [ {
"type" => "<type>" ,
"value" => "<value>"
} ] ,
"firstName" => "<firstName>",
"lastName" => "<lastName>",
"password" => "<password>"} #Required
sott = "<sott>" #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
options = "<options>" #Optional
verification_url = "<verification_url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.user_registration_by_email(auth_user_registration_model, sott, email_template, fields, options, verification_url, welcome_email_template)
auth_user_registration_model_with_captcha ={
"email" => [ {
"type" => "<type>" ,
"value" => "<value>"
} ] ,
"firstName" => "<firstName>",
"g-recaptcha-response" => "<g-recaptcha-response>",
"lastName" => "<lastName>",
"password" => "<password>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
options = "<options>" #Optional
sms_template = "<sms_template>" #Optional
verification_url = "<verification_url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.user_registration_by_captcha(auth_user_registration_model_with_captcha, email_template, fields, options, sms_template, verification_url, welcome_email_template)
email = "<email>" #Required
response = AuthenticationApi.get_security_questions_by_email(email)
user_name = "<user_name>" #Required
response = AuthenticationApi.get_security_questions_by_user_name(user_name)
phone = "<phone>" #Required
response = AuthenticationApi.get_security_questions_by_phone(phone)
access_token = "<access_token>" #Required
response = AuthenticationApi.get_security_questions_by_access_token(access_token)
access_token = "<access_token>" #Required
response = AuthenticationApi.auth_validate_access_token(access_token)
access_token = "<access_token>" #Required
prevent_refresh = true #Optional
response = AuthenticationApi.auth_in_validate_access_token(access_token, prevent_refresh)
access_token = "<access_token>" #Required
response = AuthenticationApi.get_access_token_info(access_token)
access_token = "<access_token>" #Required
fields = nil #Optional
email_template = "<email_template>" #Optional
verification_url = "<verification_url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.get_profile_by_access_token(access_token, fields, email_template, verification_url, welcome_email_template)
access_token = "<access_token>" #Required
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.send_welcome_email(access_token, welcome_email_template)
deletetoken = "<deletetoken>" #Required
response = AuthenticationApi.delete_account_by_delete_token(deletetoken)
client_guid = "<client_guid>" #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
verification_url = "<verification_url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.get_profile_by_ping(client_guid, email_template, fields, verification_url, welcome_email_template)
email = "<email>" #Required
response = AuthenticationApi.check_email_availability(email)
verification_token = "<verification_token>" #Required
fields = nil #Optional
url = "<url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = AuthenticationApi.verify_email(verification_token, fields, url, welcome_email_template)
username = "<username>" #Required
response = AuthenticationApi.check_user_name_availability(username)
access_token = "<access_token>" #Required
fields = nil #Optional
response = AuthenticationApi.accept_privacy_policy(access_token, fields)
access_token = "<access_token>" #Required
response = AuthenticationApi.get_privacy_policy_history_by_access_token(access_token)
access_token = "<access_token>" #Required
delete_url = "<delete_url>" #Optional
email_template = "<email_template>" #Optional
response = AuthenticationApi.delete_account_with_email_confirmation(access_token, delete_url, email_template)
access_token = "<access_token>" #Required
email = "<email>" #Required
response = AuthenticationApi.remove_email(access_token, email)
access_token = "<access_token>" #Required
provider = "<provider>" #Required
provider_id = "<provider_id>" #Required
response = AuthenticationApi.unlink_social_identities(access_token, provider, provider_id)
List of APIs in this Section:
- PUT : Account Update
- PUT : Update Phone ID by UID
- PUT : Account Set Password
- PUT : Account Invalidate Verification Email
- PUT : Reset phone ID verification
- PUT : Upsert Email
- PUT : Update UID
- POST : Account Create
- POST : Forgot Password token
- POST : Email Verification token
- GET : Get Privacy Policy History By Uid
- GET : Account Profiles by Email
- GET : Account Profiles by Username
- GET : Account Profile by Phone ID
- GET : Account Profiles by UID
- GET : Account Password
- GET : Access Token based on UID or User impersonation API
- GET : Refresh Access Token by Refresh Token
- GET : Revoke Refresh Token
- GET : Account Identities by Email
- DELETE : Account Delete
- DELETE : Account Remove Email
- DELETE : Delete User Profiles By Email
account_user_profile_update_model ={
"firstName" => "<firstName>",
"lastName" => "<lastName>"} #Required
uid = "<uid>" #Required
fields = nil #Optional
null_support = true #Optional
response = AccountApi.update_account_by_uid(account_user_profile_update_model, uid, fields, null_support)
phone = "<phone>" #Required
uid = "<uid>" #Required
fields = nil #Optional
response = AccountApi.update_phone_id_by_uid(phone, uid, fields)
password = "<password>" #Required
uid = "<uid>" #Required
response = AccountApi.set_account_password_by_uid(password, uid)
uid = "<uid>" #Required
email_template = "<email_template>" #Optional
verification_url = "<verification_url>" #Optional
response = AccountApi.invalidate_account_email_verification(uid, email_template, verification_url)
uid = "<uid>" #Required
sms_template = "<sms_template>" #Optional
response = AccountApi.reset_phone_id_verification_by_uid(uid, sms_template)
upsert_email_model ={
"email" => [ {
"type" => "<type>" ,
"value" => "<value>"
} ] } #Required
uid = "<uid>" #Required
fields = nil #Optional
response = AccountApi.upsert_email(upsert_email_model, uid, fields)
update_uid_model ={
"newUid" => "<newUid>"} #Required
uid = "<uid>" #Required
response = AccountApi.account_update_uid(update_uid_model, uid)
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)
account_create_model ={
"email" => [ {
"type" => "<type>" ,
"value" => "<value>"
} ] ,
"firstName" => "<firstName>",
"lastName" => "<lastName>",
"password" => "<password>"} #Required
fields = nil #Optional
response = AccountApi.create_account(account_create_model, fields)
email = "<email>" #Required
email_template = "<email_template>" #Optional
reset_password_url = "<reset_password_url>" #Optional
send_email = true #Optional
response = AccountApi.get_forgot_password_token(email, email_template, reset_password_url, send_email)
email = "<email>" #Required
response = AccountApi.get_email_verification_token(email)
uid = "<uid>" #Required
response = AccountApi.get_privacy_policy_history_by_uid(uid)
email = "<email>" #Required
fields = nil #Optional
response = AccountApi.get_account_profile_by_email(email, fields)
user_name = "<user_name>" #Required
fields = nil #Optional
response = AccountApi.get_account_profile_by_user_name(user_name, fields)
phone = "<phone>" #Required
fields = nil #Optional
response = AccountApi.get_account_profile_by_phone(phone, fields)
uid = "<uid>" #Required
fields = nil #Optional
response = AccountApi.get_account_profile_by_uid(uid, fields)
uid = "<uid>" #Required
response = AccountApi.get_account_password_hash_by_uid(uid)
uid = "<uid>" #Required
response = AccountApi.get_access_token_by_uid(uid)
refresh_token = "<refresh_token>" #Required
response = AccountApi.refresh_access_token_by_refresh_token(refresh_token)
refresh_token = "<refresh_token>" #Required
response = AccountApi.revoke_refresh_token(refresh_token)
email = "<email>" #Required
fields = nil #Optional
response = AccountApi.get_account_identities_by_email(email, fields)
uid = "<uid>" #Required
response = AccountApi.delete_account_by_uid(uid)
email = "<email>" #Required
uid = "<uid>" #Required
fields = nil #Optional
response = AccountApi.remove_email(email, uid, fields)
email = "<email>" #Required
response = AccountApi.account_delete_by_email(email)
List of APIs in this Section:
- GET : Access Token
- GET : Refresh Token
- GET : Token Validate
- GET : Access Token Invalidate
- GET : Get Active Session Details
- GET : Get Active Session By Account Id
- GET : Get Active Session By Profile Id
token = "<token>" #Required
response = SocialApi.exchange_access_token(token)
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)
access_token = "<access_token>" #Required
expires_in = 0 #Optional
is_web = true #Optional
response = SocialApi.refresh_access_token(access_token, expires_in, is_web)
access_token = "<access_token>" #Required
response = SocialApi.validate_access_token(access_token)
access_token = "<access_token>" #Required
response = SocialApi.in_validate_access_token(access_token)
token = "<token>" #Required
response = SocialApi.get_active_session(token)
account_id = "<account_id>" #Required
response = SocialApi.get_active_session_by_account_id(account_id)
profile_id = "<profile_id>" #Required
response = SocialApi.get_active_session_by_profile_id(profile_id)
List of APIs in this Section:
- PUT : Custom Object Update by Access Token
- PUT : Custom Object Update by UID
- POST : Create Custom Object by Token
- POST : Create Custom Object by UID
- GET : Custom Object by Token
- GET : Custom Object by ObjectRecordId and Token
- GET : Custom Object By UID
- GET : Custom Object by ObjectRecordId and UID
- DELETE : Custom Object Delete by Record Id And Token
- DELETE : Account Delete Custom Object by ObjectRecordId
access_token = "<access_token>" #Required
object_name = "<object_name>" #Required
object_record_id = "<object_record_id>" #Required
object = { "customdata1" => "Store my customdata1 value" } #Required
update_type = "<update_type>" #Optional
response = CustomObjectApi.update_custom_object_by_token(access_token, object_name, object_record_id, object, update_type)
object_name = "<object_name>" #Required
object_record_id = "<object_record_id>" #Required
object = { "customdata1" => "Store my customdata1 value" } #Required
uid = "<uid>" #Required
update_type = "<update_type>" #Optional
response = CustomObjectApi.update_custom_object_by_uid(object_name, object_record_id, object, uid, update_type)
access_token = "<access_token>" #Required
object_name = "<object_name>" #Required
object = { "customdata1" => "Store my customdata1 value" } #Required
response = CustomObjectApi.create_custom_object_by_token(access_token, object_name, object)
object_name = "<object_name>" #Required
object = { "customdata1" => "Store my customdata1 value" } #Required
uid = "<uid>" #Required
response = CustomObjectApi.create_custom_object_by_uid(object_name, object, uid)
access_token = "<access_token>" #Required
object_name = "<object_name>" #Required
response = CustomObjectApi.get_custom_object_by_token(access_token, object_name)
access_token = "<access_token>" #Required
object_name = "<object_name>" #Required
object_record_id = "<object_record_id>" #Required
response = CustomObjectApi.get_custom_object_by_record_id_and_token(access_token, object_name, object_record_id)
object_name = "<object_name>" #Required
uid = "<uid>" #Required
response = CustomObjectApi.get_custom_object_by_uid(object_name, uid)
object_name = "<object_name>" #Required
object_record_id = "<object_record_id>" #Required
uid = "<uid>" #Required
response = CustomObjectApi.get_custom_object_by_record_id(object_name, object_record_id, uid)
access_token = "<access_token>" #Required
object_name = "<object_name>" #Required
object_record_id = "<object_record_id>" #Required
response = CustomObjectApi.delete_custom_object_by_token(access_token, object_name, object_record_id)
object_name = "<object_name>" #Required
object_record_id = "<object_record_id>" #Required
uid = "<uid>" #Required
response = CustomObjectApi.delete_custom_object_by_record_id(object_name, object_record_id, uid)
List of APIs in this Section:
- PUT : Phone Reset Password by OTP
- PUT : Phone Verification OTP
- PUT : Phone Verification OTP by Token
- PUT : Phone Number Update
- POST : Phone Login
- POST : Phone Forgot Password by OTP
- POST : Phone Resend Verification OTP
- POST : Phone Resend Verification OTP By Token
- POST : Phone User Registration by SMS
- GET : Phone Number Availability
- DELETE : Remove Phone ID by Access Token
reset_password_by_otp_model ={
"otp" => "<otp>",
"password" => "<password>",
"phone" => "<phone>"} #Required
response = PhoneAuthenticationApi.reset_password_by_phone_otp(reset_password_by_otp_model)
otp = "<otp>" #Required
phone = "<phone>" #Required
fields = nil #Optional
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.phone_verification_by_otp(otp, phone, fields, sms_template)
access_token = "<access_token>" #Required
otp = "<otp>" #Required
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.phone_verification_otp_by_access_token(access_token, otp, sms_template)
access_token = "<access_token>" #Required
phone = "<phone>" #Required
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.update_phone_number(access_token, phone, sms_template)
phone_authentication_model ={
"password" => "<password>",
"phone" => "<phone>"} #Required
fields = nil #Optional
login_url = "<login_url>" #Optional
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.login_by_phone(phone_authentication_model, fields, login_url, sms_template)
phone = "<phone>" #Required
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.forgot_password_by_phone_otp(phone, sms_template)
phone = "<phone>" #Required
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.phone_resend_verification_otp(phone, sms_template)
access_token = "<access_token>" #Required
phone = "<phone>" #Required
sms_template = "<sms_template>" #Optional
response = PhoneAuthenticationApi.phone_resend_verification_otp_by_token(access_token, phone, sms_template)
auth_user_registration_model ={
"Email"=> [
{
"Type": "<type>",
"Value": "<value>"
}
],
"firstName" => "<firstName>",
"lastName" => "<lastName>",
"password" => "<password>",
"phoneId" => "<phoneId>"
} #Required
sott = "<sott>" #Required
fields = nil #Optional
options = "<options>" #Optional
sms_template = "<sms_template>" #Optional
verification_url = "<verification_url>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
email_template = "<email_template>" #Optional
response = PhoneAuthenticationApi.user_registration_by_phone(auth_user_registration_model, sott, fields, options, sms_template, verification_url, welcome_email_template, email_template)
phone = "<phone>" #Required
response = PhoneAuthenticationApi.check_phone_number_availability(phone)
access_token = "<access_token>" #Required
response = PhoneAuthenticationApi.remove_phone_id_by_access_token(access_token)
List of APIs in this Section:
- PUT : Update MFA Setting
- PUT : Update MFA by Access Token
- PUT : MFA Update Phone Number by Token
- PUT : Verify MFA Email OTP by Access Token
- PUT : Update MFA Security Question by Access Token
- PUT : MFA Validate OTP
- PUT : MFA Validate Google Auth Code
- PUT : MFA Validate Backup code
- PUT : MFA Update Phone Number
- PUT : Verify MFA Email OTP by MFA Token
- PUT : Update MFA Security Question by MFA Token
- POST : MFA Email Login
- POST : MFA UserName Login
- POST : MFA Phone Login
- POST : Send MFA Email OTP by MFA Token
- POST : Verify MFA Security Question by MFA Token
- GET : MFA Validate Access Token
- GET : MFA Backup Code by Access Token
- GET : Reset Backup Code by Access Token
- GET : Send MFA Email OTP by Access Token
- GET : MFA Resend Otp
- GET : MFA Backup Code by UID
- GET : MFA Reset Backup Code by UID
- DELETE : MFA Reset Google Authenticator by Token
- DELETE : MFA Reset SMS Authenticator by Token
- DELETE : Reset MFA Email OTP Authenticator By Access Token
- DELETE : MFA Reset Security Question Authenticator By Access Token
- DELETE : MFA Reset SMS Authenticator By UID
- DELETE : MFA Reset Google Authenticator By UID
- DELETE : Reset MFA Email OTP Authenticator Settings by Uid
- DELETE : Reset MFA Security Question Authenticator Settings by Uid
access_token = "<access_token>" #Required
multi_factor_auth_model_with_lockout ={
"otp" => "<otp>"} #Required
fields = nil #Optional
response = MultiFactorAuthenticationApi.mfa_update_setting(access_token, multi_factor_auth_model_with_lockout, fields)
access_token = "<access_token>" #Required
multi_factor_auth_model_by_google_authenticator_code ={
"googleAuthenticatorCode" => "<googleAuthenticatorCode>"} #Required
fields = nil #Optional
sms_template = "<sms_template>" #Optional
response = MultiFactorAuthenticationApi.mfa_update_by_access_token(access_token, multi_factor_auth_model_by_google_authenticator_code, fields, sms_template)
access_token = "<access_token>" #Required
phone_no_2fa = "<phone_no_2fa>" #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_update_phone_number_by_token(access_token, phone_no_2fa, sms_template_2fa)
access_token = "<access_token>" #Required
multi_factor_auth_model_by_email_otp_with_lockout ={
"EmailId"=>"emailId",
"Otp"=>"otp"
} #Required
response = MultiFactorAuthenticationApi.mfa_validate_email_otp_by_access_token(access_token, multi_factor_auth_model_by_email_otp_with_lockout)
access_token = "<access_token>" #Required
security_question_answer_model_by_access_token ={
"securityquestionanswer"=> [
{
"QuestionId"=> "db7****8a73e4******bd9****8c20",
"Answer"=> "<answer>"
}
],
"ReplaceSecurityQuestionAnswer"=>true
} #Required
response = MultiFactorAuthenticationApi.mfa_security_question_answer_by_access_token(access_token, security_question_answer_model_by_access_token)
multi_factor_auth_model_with_lockout ={
"otp" => "<otp>"} #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
fields = nil #Optional
sms_template_2fa = "<sms_template_2fa>" #Optional
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
response = MultiFactorAuthenticationApi.mfa_validate_otp_by_phone(multi_factor_auth_model_with_lockout, second_factor_authentication_token, fields, sms_template_2fa, rba_browser_email_template, rba_city_email_template, rba_country_email_template, rba_ip_email_template)
google_authenticator_code = "<google_authenticator_code>" #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
fields = nil #Optional
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
response = MultiFactorAuthenticationApi.mfa_validate_google_auth_code(google_authenticator_code, second_factor_authentication_token, fields, rba_browser_email_template, rba_city_email_template, rba_country_email_template, rba_ip_email_template)
multi_factor_auth_model_by_backup_code ={
"backupCode" => "<backupCode>"} #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
fields = nil #Optional
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
response = MultiFactorAuthenticationApi.mfa_validate_backup_code(multi_factor_auth_model_by_backup_code, second_factor_authentication_token, fields, rba_browser_email_template, rba_city_email_template, rba_country_email_template, rba_ip_email_template)
phone_no_2fa = "<phone_no_2fa>" #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_update_phone_number(phone_no_2fa, second_factor_authentication_token, sms_template_2fa)
multi_factor_auth_model_by_email_otp ={
"EmailId"=>"email",
"Otp"=>"otp"
} #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
response = MultiFactorAuthenticationApi.mfa_validate_email_otp(multi_factor_auth_model_by_email_otp, second_factor_authentication_token, rba_browser_email_template, rba_city_email_template, rba_country_email_template, rba_ip_email_template)
security_question_answer_update_model ={
"securityquestionanswer"=> [
{
"QuestionId"=> "db7****8a73e4******bd9****8c20",
"Answer"=> "<answer>"
}
]
} #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
response = MultiFactorAuthenticationApi.mfa_security_question_answer(security_question_answer_update_model, second_factor_authentication_token)
email = "<email>" #Required
password = "<password>" #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
sms_template = "<sms_template>" #Optional
sms_template_2fa = "<sms_template_2fa>" #Optional
verification_url = "<verification_url>" #Optional
email_template_2fa = "<email_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_login_by_email(email, password, email_template, fields, login_url, sms_template, sms_template_2fa, verification_url,email_template_2fa)
password = "<password>" #Required
username = "<username>" #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
sms_template = "<sms_template>" #Optional
sms_template_2fa = "<sms_template_2fa>" #Optional
verification_url = "<verification_url>" #Optional
email_template_2fa = "<email_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_login_by_user_name(password, username, email_template, fields, login_url, sms_template, sms_template_2fa, verification_url,email_template_2fa)
password = "<password>" #Required
phone = "<phone>" #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
sms_template = "<sms_template>" #Optional
sms_template_2fa = "<sms_template_2fa>" #Optional
verification_url = "<verification_url>" #Optional
email_template_2fa = "<email_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_login_by_phone(password, phone, email_template, fields, login_url, sms_template, sms_template_2fa, verification_url,email_template_2fa)
email_id_model ={
"EmailId"=>"email"
} #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
email_template_2fa = "<email_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_email_otp(email_id_model, second_factor_authentication_token, email_template_2fa)
security_question_answer_update_model ={
"securityquestionanswer"=> [
{
"QuestionId"=> "db7****8a73e4******bd9****8c20",
"Answer"=> "<answer>"
}
]
} #Required
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
response = MultiFactorAuthenticationApi.mfa_security_question_answer_verification(security_question_answer_update_model, second_factor_authentication_token, rba_browser_email_template, rba_city_email_template, rba_country_email_template, rba_ip_email_template)
access_token = "<access_token>" #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_configure_by_access_token(access_token, sms_template_2fa)
access_token = "<access_token>" #Required
response = MultiFactorAuthenticationApi.mfa_backup_code_by_access_token(access_token)
access_token = "<access_token>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_backup_code_by_access_token(access_token)
access_token = "<access_token>" #Required
email_id = "<email_id>" #Required
email_template_2fa = "<email_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_email_otp_by_access_token(access_token, email_id, email_template_2fa)
second_factor_authentication_token = "<second_factor_authentication_token>" #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = MultiFactorAuthenticationApi.mfa_resend_otp(second_factor_authentication_token, sms_template_2fa)
uid = "<uid>" #Required
response = MultiFactorAuthenticationApi.mfa_backup_code_by_uid(uid)
uid = "<uid>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_backup_code_by_uid(uid)
access_token = "<access_token>" #Required
googleauthenticator = true #Required
response = MultiFactorAuthenticationApi.mfa_reset_google_auth_by_token(access_token, googleauthenticator)
access_token = "<access_token>" #Required
otpauthenticator = true #Required
response = MultiFactorAuthenticationApi.mfa_reset_sms_auth_by_token(access_token, otpauthenticator)
access_token = "<access_token>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_email_otp_authenticator_by_access_token(access_token)
access_token = "<access_token>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_security_question_authenticator_by_access_token(access_token)
otpauthenticator = true #Required
uid = "<uid>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_sms_authenticator_by_uid(otpauthenticator, uid)
googleauthenticator = true #Required
uid = "<uid>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_google_authenticator_by_uid(googleauthenticator, uid)
uid = "<uid>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_email_otp_authenticator_by_uid(uid)
uid = "<uid>" #Required
response = MultiFactorAuthenticationApi.mfa_reset_security_question_authenticator_by_uid(uid)
List of APIs in this Section:
- PUT : Reset PIN By ResetToken
- PUT : Reset PIN By SecurityAnswer And Email
- PUT : Reset PIN By SecurityAnswer And Username
- PUT : Reset PIN By SecurityAnswer And Phone
- PUT : Change PIN By Token
- PUT : Reset PIN by Phone and OTP
- PUT : Reset PIN by Email and OTP
- PUT : Reset PIN by Username and OTP
- POST : PIN Login
- POST : Forgot PIN By Email
- POST : Forgot PIN By UserName
- POST : Forgot PIN By Phone
- POST : Set PIN By PinAuthToken
- GET : Invalidate PIN Session Token
reset_pin_by_reset_token ={
"pin" => "<pin>",
"resetToken" => "<resetToken>"} #Required
response = PINAuthenticationApi.reset_pin_by_reset_token(reset_pin_by_reset_token)
reset_pin_by_security_question_answer_and_email_model ={
"email" => "<email>",
"pin" => "<pin>",
"securityAnswer" => {"QuestionID"=>"Answer"}} #Required
response = PINAuthenticationApi.reset_pin_by_email_and_security_answer(reset_pin_by_security_question_answer_and_email_model)
reset_pin_by_security_question_answer_and_username_model ={
"pin" => "<pin>",
"securityAnswer" => {"QuestionID"=>"Answer"},
"username" => "<username>"} #Required
response = PINAuthenticationApi.reset_pin_by_username_and_security_answer(reset_pin_by_security_question_answer_and_username_model)
reset_pin_by_security_question_answer_and_phone_model ={
"phone" => "<phone>",
"pin" => "<pin>",
"securityAnswer" => {"QuestionID"=>"Answer"}} #Required
response = PINAuthenticationApi.reset_pin_by_phone_and_security_answer(reset_pin_by_security_question_answer_and_phone_model)
access_token = "<access_token>" #Required
change_pin_model ={
"newPIN" => "<newPIN>",
"oldPIN" => "<oldPIN>"} #Required
response = PINAuthenticationApi.change_pin_by_access_token(access_token, change_pin_model)
reset_pin_by_phone_and_otp_model ={
"otp" => "<otp>",
"phone" => "<phone>",
"pin" => "<pin>"} #Required
response = PINAuthenticationApi.reset_pin_by_phone_and_otp(reset_pin_by_phone_and_otp_model)
reset_pin_by_email_and_otp_model ={
"email" => "<email>",
"otp" => "<otp>",
"pin" => "<pin>"} #Required
response = PINAuthenticationApi.reset_pin_by_email_and_otp(reset_pin_by_email_and_otp_model)
reset_pin_by_username_and_otp_model ={
"otp" => "<otp>",
"pin" => "<pin>",
"username" => "<username>"} #Required
response = PINAuthenticationApi.reset_pin_by_username_and_otp(reset_pin_by_username_and_otp_model)
login_by_pin_model ={
"pin" => "<pin>"} #Required
session_token = "<session_token>" #Required
response = PINAuthenticationApi.pin_login(login_by_pin_model, session_token)
forgot_pin_link_by_email_model ={
"email" => "<email>"} #Required
email_template = "<email_template>" #Optional
reset_pin_url = "<reset_pin_url>" #Optional
response = PINAuthenticationApi.send_forgot_pin_email_by_email(forgot_pin_link_by_email_model, email_template, reset_pin_url)
forgot_pin_link_by_user_name_model ={
"userName" => "<userName>"} #Required
email_template = "<email_template>" #Optional
reset_pin_url = "<reset_pin_url>" #Optional
response = PINAuthenticationApi.send_forgot_pin_email_by_username(forgot_pin_link_by_user_name_model, email_template, reset_pin_url)
forgot_pin_otp_by_phone_model ={
"phone" => "<phone>"} #Required
sms_template = "<sms_template>" #Optional
response = PINAuthenticationApi.send_forgot_pin_sms_by_phone(forgot_pin_otp_by_phone_model, sms_template)
pin_required_model ={
"pin" => "<pin>"} #Required
pin_auth_token = "<pin_auth_token>" #Required
response = PINAuthenticationApi.set_pin_by_pin_auth_token(pin_required_model, pin_auth_token)
session_token = "<session_token>" #Required
response = PINAuthenticationApi.in_validate_pin_session_token(session_token)
List of APIs in this Section:
- PUT : Validate MFA by OTP
- PUT : Validate MFA by Backup Code
- PUT : Validate MFA by Google Authenticator Code
- PUT : Validate MFA by Password
- PUT : MFA Re-authentication by PIN
- PUT : MFA Re-authentication by Email OTP
- POST : Verify Multifactor OTP Authentication
- POST : Verify Multifactor Password Authentication
- POST : Verify Multifactor PIN Authentication
- POST : MFA Re-authentication by Security Question
- GET : Multi Factor Re-Authenticate
- GET : Send MFA Re-auth Email OTP by Access Token
access_token = "<access_token>" #Required
reauth_by_otp_model ={
"otp" => "<otp>"} #Required
response = ReAuthenticationApi.mfa_re_authenticate_by_otp(access_token, reauth_by_otp_model)
access_token = "<access_token>" #Required
reauth_by_backup_code_model ={
"backupCode" => "<backupCode>"} #Required
response = ReAuthenticationApi.mfa_re_authenticate_by_backup_code(access_token, reauth_by_backup_code_model)
access_token = "<access_token>" #Required
reauth_by_google_authenticator_code_model ={
"googleAuthenticatorCode" => "<googleAuthenticatorCode>"} #Required
response = ReAuthenticationApi.mfa_re_authenticate_by_google_auth(access_token, reauth_by_google_authenticator_code_model)
access_token = "<access_token>" #Required
password_event_based_auth_model_with_lockout ={
"password" => "<password>"} #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = ReAuthenticationApi.mfa_re_authenticate_by_password(access_token, password_event_based_auth_model_with_lockout, sms_template_2fa)
access_token = "<access_token>" #Required
pin_auth_event_based_auth_model_with_lockout ={
"pin" => "<pin>"} #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = ReAuthenticationApi.verify_pin_authentication(access_token, pin_auth_event_based_auth_model_with_lockout, sms_template_2fa)
access_token = "<access_token>" #Required
reauth_by_email_otp_model ={
"EmailId"=>"email",
"otp"=> "otp"
} #Required
response = ReAuthenticationApi.re_auth_validate_email_otp(access_token, reauth_by_email_otp_model)
event_based_multi_factor_token ={
"secondFactorValidationToken" => "<secondFactorValidationToken>"} #Required
uid = "<uid>" #Required
response = ReAuthenticationApi.verify_multi_factor_otp_reauthentication(event_based_multi_factor_token, uid)
event_based_multi_factor_token ={
"secondFactorValidationToken" => "<secondFactorValidationToken>"} #Required
uid = "<uid>" #Required
response = ReAuthenticationApi.verify_multi_factor_password_reauthentication(event_based_multi_factor_token, uid)
event_based_multi_factor_token ={
"secondFactorValidationToken" => "<secondFactorValidationToken>"} #Required
uid = "<uid>" #Required
response = ReAuthenticationApi.verify_multi_factor_pin_reauthentication(event_based_multi_factor_token, uid)
access_token = "<access_token>" #Required
security_question_answer_update_model ={
"securityquestionanswer"=> [
{
"QuestionId"=> "db7****8a73e4******bd9****8c20",
"Answer"=> "<answer>"
}
]
} #Required
response = ReAuthenticationApi.re_auth_by_security_question(access_token, security_question_answer_update_model)
access_token = "<access_token>" #Required
sms_template_2fa = "<sms_template_2fa>" #Optional
response = ReAuthenticationApi.mfa_re_authenticate(access_token, sms_template_2fa)
access_token = "<access_token>" #Required
email_id = "<email_id>" #Required
email_template_2fa = "<email_template_2fa>" #Optional
response = ReAuthenticationApi.re_auth_send_email_otp(access_token, email_id, email_template_2fa)
List of APIs in this Section:
- PUT : Update Consent By Access Token
- POST : Consent By ConsentToken
- POST : Post Consent By Access Token
- GET : Get Consent Logs By Uid
- GET : Get Consent Log by Access Token
- GET : Get Verify Consent By Access Token
access_token = "<access_token>" #Required
consent_update_model ={
"consents" => [ {
"consentOptionId" => "<consentOptionId>" ,
"isAccepted" => true
} ] } #Required
response = ConsentManagementApi.update_consent_profile_by_access_token(access_token, consent_update_model)
consent_token = "<consent_token>" #Required
consent_submit_model ={
"data" => [ {
"consentOptionId" => "<consentOptionId>" ,
"isAccepted" => true
} ] ,
"events" => [ {
"event" => "<event>" ,
"isCustom" => true
} ] } #Required
response = ConsentManagementApi.submit_consent_by_consent_token(consent_token, consent_submit_model)
access_token = "<access_token>" #Required
consent_submit_model ={
"data" => [ {
"consentOptionId" => "<consentOptionId>" ,
"isAccepted" => true
} ] ,
"events" => [ {
"event" => "<event>" ,
"isCustom" => true
} ] } #Required
response = ConsentManagementApi.submit_consent_by_access_token(access_token, consent_submit_model)
uid = "<uid>" #Required
response = ConsentManagementApi.get_consent_logs_by_uid(uid)
access_token = "<access_token>" #Required
response = ConsentManagementApi.get_consent_logs(access_token)
access_token = "<access_token>" #Required
event = "<event>" #Required
is_custom = true #Required
response = ConsentManagementApi.verify_consent_by_access_token(access_token, event, is_custom)
List of APIs in this Section:
- GET : Smart Login Verify Token
- GET : Smart Login By Email
- GET : Smart Login By Username
- GET : Smart Login Ping
verification_token = "<verification_token>" #Required
welcome_email_template = "<welcome_email_template>" #Optional
response = SmartLoginApi.smart_login_token_verification(verification_token, welcome_email_template)
client_guid = "<client_guid>" #Required
email = "<email>" #Required
redirect_url = "<redirect_url>" #Optional
smart_login_email_template = "<smart_login_email_template>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = SmartLoginApi.smart_login_by_email(client_guid, email, redirect_url, smart_login_email_template, welcome_email_template)
client_guid = "<client_guid>" #Required
username = "<username>" #Required
redirect_url = "<redirect_url>" #Optional
smart_login_email_template = "<smart_login_email_template>" #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = SmartLoginApi.smart_login_by_user_name(client_guid, username, redirect_url, smart_login_email_template, welcome_email_template)
client_guid = "<client_guid>" #Required
fields = nil #Optional
response = SmartLoginApi.smart_login_ping(client_guid, fields)
List of APIs in this Section:
- PUT : One Touch OTP Verification
- POST : One Touch Login by Email
- POST : One Touch Login by Phone
- GET : One Touch Email Verification
- GET : One Touch Login Ping
otp = "<otp>" #Required
phone = "<phone>" #Required
fields = nil #Optional
sms_template = "<sms_template>" #Optional
response = OneTouchLoginApi.one_touch_login_otp_verification(otp, phone, fields, sms_template)
one_touch_login_by_email_model ={
"clientguid" => "<clientguid>",
"email" => "<email>",
"g-recaptcha-response" => "<g-recaptcha-response>"} #Required
one_touch_login_email_template = "<one_touch_login_email_template>" #Optional
redirecturl = "<redirecturl>" #Optional
welcomeemailtemplate = "<welcomeemailtemplate>" #Optional
response = OneTouchLoginApi.one_touch_login_by_email(one_touch_login_by_email_model, one_touch_login_email_template, redirecturl, welcomeemailtemplate)
one_touch_login_by_phone_model ={
"g-recaptcha-response" => "<g-recaptcha-response>",
"phone" => "<phone>"} #Required
sms_template = "<sms_template>" #Optional
response = OneTouchLoginApi.one_touch_login_by_phone(one_touch_login_by_phone_model, sms_template)
verification_token = "<verification_token>" #Required
welcome_email_template = "<welcome_email_template>" #Optional
response = OneTouchLoginApi.one_touch_email_verification(verification_token, welcome_email_template)
client_guid = "<client_guid>" #Required
fields = nil #Optional
response = OneTouchLoginApi.one_touch_login_ping(client_guid, fields)
List of APIs in this Section:
- PUT : Passwordless Login Phone Verification
- POST : Passwordless Login Verification By Email And OTP
- POST : Passwordless Login Verification By User Name And OTP
- GET : Passwordless Login by Phone
- GET : Passwordless Login By Email
- GET : Passwordless Login By UserName
- GET : Passwordless Login Verification
password_less_login_otp_model ={
"otp" => "<otp>",
"phone" => "<phone>"} #Required
fields = nil #Optional
sms_template = "<sms_template>" #Optional
response = PasswordLessLoginApi.passwordless_login_phone_verification(password_less_login_otp_model, fields, sms_template)
password_less_login_by_email_and_otp_model ={
"otp" => "<otp>",
"email" => "<email>",
"welcomeemailtemplate" => "<welcome_email_template>"
} #Required
fields = nil #Optional
response = PasswordLessLoginApi.passwordless_login_verification_by_email_and_otp(password_less_login_by_email_and_otp_model, fields)
password_less_login_by_user_name_and_otp_model ={
"otp" => "<otp>",
"username" => "<username>",
"welcomeemailtemplate" => "<welcome_email_template>"
} #Required
fields = nil #Optional
response = PasswordLessLoginApi.passwordless_login_verification_by_user_name_and_otp(password_less_login_by_user_name_and_otp_model, fields)
phone = "<phone>" #Required
sms_template = "<sms_template>" #Optional
response = PasswordLessLoginApi.passwordless_login_by_phone(phone, sms_template)
email = "<email>" #Required
password_less_login_template = "<password_less_login_template>" #Optional
verification_url = "<verification_url>" #Optional
response = PasswordLessLoginApi.passwordless_login_by_email(email, password_less_login_template, verification_url)
username = "<username>" #Required
password_less_login_template = "<password_less_login_template>" #Optional
verification_url = "<verification_url>" #Optional
response = PasswordLessLoginApi.passwordless_login_by_user_name(username, password_less_login_template, verification_url)
verification_token = "<verification_token>" #Required
fields = nil #Optional
welcome_email_template = "<welcome_email_template>" #Optional
response = PasswordLessLoginApi.passwordless_login_verification(verification_token, fields, welcome_email_template)
List of APIs in this Section:
- GET : Get Server Time
- GET : Get Configurations
time_difference = 0 #Optional
response = ConfigurationApi.get_server_info(time_difference)
response = ConfigurationApi.get_configurations()
List of APIs in this Section:
- PUT : Assign Roles by UID
- PUT : Upsert Context
- PUT : Add Permissions to Role
- POST : Roles Create
- GET : Roles by UID
- GET : Get Context with Roles and Permissions
- GET : Role Context profile
- GET : Roles List
- DELETE : Unassign Roles by UID
- DELETE : Delete Role Context
- DELETE : Delete Role from Context
- DELETE : Delete Additional Permission from Context
- DELETE : Account Delete Role
- DELETE : Remove Permissions
account_roles_model ={
"roles" => [ "roles" ] } #Required
uid = "<uid>" #Required
response = RoleApi.assign_roles_by_uid(account_roles_model, uid)
account_role_context_model ={
"roleContext" => [ {
"additionalPermissions" => ["<additionalPermissions>" ] ,
"context" => "<context>" ,
"expiration" => "<expiration>" ,
"roles" => ["<roles>" ]
} ] } #Required
uid = "<uid>" #Required
response = RoleApi.update_role_context_by_uid(account_role_context_model, uid)
permissions_model ={
"permissions" => [ "permissions" ] } #Required
role = "<role>" #Required
response = RoleApi.add_role_permissions(permissions_model, role)
roles_model ={
"roles" => [ {
"name" => "<name>" ,
"permissions" => {"Permission_name"=>true}
} ] } #Required
response = RoleApi.create_roles(roles_model)
uid = "<uid>" #Required
response = RoleApi.get_roles_by_uid(uid)
uid = "<uid>" #Required
response = RoleApi.get_role_context_by_uid(uid)
context_name = "<context_name>" #Required
response = RoleApi.get_role_context_by_context_name(context_name)
response = RoleApi.get_roles_list()
account_roles_model ={
"roles" => [ "roles" ] } #Required
uid = "<uid>" #Required
response = RoleApi.unassign_roles_by_uid(account_roles_model, uid)
context_name = "<context_name>" #Required
uid = "<uid>" #Required
response = RoleApi.delete_role_context_by_uid(context_name, uid)
context_name = "<context_name>" #Required
role_context_remove_role_model ={
"roles" => [ "roles" ] } #Required
uid = "<uid>" #Required
response = RoleApi.delete_roles_from_role_context_by_uid(context_name, role_context_remove_role_model, uid)
context_name = "<context_name>" #Required
role_context_additional_permission_remove_role_model ={
"additionalPermissions" => [ "additionalPermissions" ] } #Required
uid = "<uid>" #Required
response = RoleApi.delete_additional_permission_from_role_context_by_uid(context_name, role_context_additional_permission_remove_role_model, uid)
role = "<role>" #Required
response = RoleApi.delete_role(role)
permissions_model ={
"permissions" => [ "permissions" ] } #Required
role = "<role>" #Required
response = RoleApi.remove_role_permissions(permissions_model, role)
List of APIs in this Section:
- POST : Risk Based Authentication Login by Email
- POST : Risk Based Authentication Login by Username
- POST : Risk Based Authentication Phone Login
email_authentication_model ={
"email" => "<email>",
"password" => "<password>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
password_delegation = true #Optional
password_delegation_app = "<password_delegation_app>" #Optional
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_browser_sms_template = "<rba_browser_sms_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_city_sms_template = "<rba_city_sms_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_country_sms_template = "<rba_country_sms_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
rba_ip_sms_template = "<rba_ip_sms_template>" #Optional
rba_oneclick_email_template = "<rba_oneclick_email_template>" #Optional
rba_otp_sms_template = "<rba_otp_sms_template>" #Optional
sms_template = "<sms_template>" #Optional
verification_url = "<verification_url>" #Optional
response = RiskBasedAuthenticationApi.rba_login_by_email(email_authentication_model, email_template, fields, login_url, password_delegation, password_delegation_app, rba_browser_email_template, rba_browser_sms_template, rba_city_email_template, rba_city_sms_template, rba_country_email_template, rba_country_sms_template, rba_ip_email_template, rba_ip_sms_template, rba_oneclick_email_template, rba_otp_sms_template, sms_template, verification_url)
user_name_authentication_model ={
"password" => "<password>",
"username" => "<username>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
password_delegation = true #Optional
password_delegation_app = "<password_delegation_app>" #Optional
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_browser_sms_template = "<rba_browser_sms_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_city_sms_template = "<rba_city_sms_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_country_sms_template = "<rba_country_sms_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
rba_ip_sms_template = "<rba_ip_sms_template>" #Optional
rba_oneclick_email_template = "<rba_oneclick_email_template>" #Optional
rba_otp_sms_template = "<rba_otp_sms_template>" #Optional
sms_template = "<sms_template>" #Optional
verification_url = "<verification_url>" #Optional
response = RiskBasedAuthenticationApi.rba_login_by_user_name(user_name_authentication_model, email_template, fields, login_url, password_delegation, password_delegation_app, rba_browser_email_template, rba_browser_sms_template, rba_city_email_template, rba_city_sms_template, rba_country_email_template, rba_country_sms_template, rba_ip_email_template, rba_ip_sms_template, rba_oneclick_email_template, rba_otp_sms_template, sms_template, verification_url)
phone_authentication_model ={
"password" => "<password>",
"phone" => "<phone>"} #Required
email_template = "<email_template>" #Optional
fields = nil #Optional
login_url = "<login_url>" #Optional
password_delegation = true #Optional
password_delegation_app = "<password_delegation_app>" #Optional
rba_browser_email_template = "<rba_browser_email_template>" #Optional
rba_browser_sms_template = "<rba_browser_sms_template>" #Optional
rba_city_email_template = "<rba_city_email_template>" #Optional
rba_city_sms_template = "<rba_city_sms_template>" #Optional
rba_country_email_template = "<rba_country_email_template>" #Optional
rba_country_sms_template = "<rba_country_sms_template>" #Optional
rba_ip_email_template = "<rba_ip_email_template>" #Optional
rba_ip_sms_template = "<rba_ip_sms_template>" #Optional
rba_oneclick_email_template = "<rba_oneclick_email_template>" #Optional
rba_otp_sms_template = "<rba_otp_sms_template>" #Optional
sms_template = "<sms_template>" #Optional
verification_url = "<verification_url>" #Optional
response = RiskBasedAuthenticationApi.rba_login_by_phone(phone_authentication_model, email_template, fields, login_url, password_delegation, password_delegation_app, rba_browser_email_template, rba_browser_sms_template, rba_city_email_template, rba_city_sms_template, rba_country_email_template, rba_country_sms_template, rba_ip_email_template, rba_ip_sms_template, rba_oneclick_email_template, rba_otp_sms_template, sms_template, verification_url)
List of APIs in this Section:
- GET : Generate SOTT
time_difference = 0 #Optional
response = SottApi.generate_sott(time_difference)
List of APIs in this Section:
- GET : Access Token via Facebook Token
- GET : Access Token via Twitter Token
- GET : Access Token via Google Token
- GET : Access Token using google JWT token for Native Mobile Login
- GET : Access Token via Linkedin Token
- GET : Get Access Token By Foursquare Access Token
- GET : Access Token via Apple Id Code
- GET : Access Token via WeChat Code
- GET : Access Token via Google AuthCode
fb_access_token = "<fb_access_token>" #Required
social_app_name = "<social_app_name>" #Optional
response = NativeSocialApi.get_access_token_by_facebook_access_token(fb_access_token, social_app_name)
tw_access_token = "<tw_access_token>" #Required
tw_token_secret = "<tw_token_secret>" #Required
social_app_name = "<social_app_name>" #Optional
response = NativeSocialApi.get_access_token_by_twitter_access_token(tw_access_token, tw_token_secret, social_app_name)
google_access_token = "<google_access_token>" #Required
client_id = "<client_id>" #Optional
refresh_token = "<refresh_token>" #Optional
social_app_name = "<social_app_name>" #Optional
response = NativeSocialApi.get_access_token_by_google_access_token(google_access_token, client_id, refresh_token, social_app_name)
id_token = "<id_token>" #Required
response = NativeSocialApi.get_access_token_by_google_j_w_t_access_token(id_token)
ln_access_token = "<ln_access_token>" #Required
social_app_name = "<social_app_name>" #Optional
response = NativeSocialApi.get_access_token_by_linkedin_access_token(ln_access_token, social_app_name)
fs_access_token = "<fs_access_token>" #Required
response = NativeSocialApi.get_access_token_by_foursquare_access_token(fs_access_token)
code = "<code>" #Required
social_app_name = "<social_app_name>" #Optional
response = NativeSocialApi.get_access_token_by_apple_id_code(code, social_app_name)
code = "<code>" #Required
response = NativeSocialApi.get_access_token_by_we_chat_code(code)
google_authcode = "<google_authcode>" #Required
social_app_name = "<social_app_name>" #Optional
response = NativeSocialApi.get_access_token_by_google_auth_code(google_authcode, social_app_name)
List of APIs in this Section:
- POST : Webhook Subscribe
- GET : Webhook Subscribed URLs
- GET : Webhook Test
- DELETE : WebHook Unsubscribe
web_hook_subscribe_model ={
"event" => "<event>",
"targetUrl" => "<targetUrl>"} #Required
response = WebHookApi.web_hook_subscribe(web_hook_subscribe_model)
event = "<event>" #Required
response = WebHookApi.get_web_hook_subscribed_u_r_ls(event)
response = WebHookApi.webhook_test()
web_hook_subscribe_model ={
"event" => "<event>",
"targetUrl" => "<targetUrl>"} #Required
response = WebHookApi.web_hook_unsubscribe(web_hook_subscribe_model)
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 function.
#do not pass the time difference if you are passing start_time & end_time.
time_difference=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.
api_key="" # (Optional) LoginRadius Api Key.
api_secret="" # (Optional) LoginRadius Api Secret (Only Primary Api Secret is used to generate the SOTT manually).
# You can pass the start and end time interval and the SOTT will be valid for this time duration.
start_time="2021-01-10 07:10:42" # Valid Start Date with Date and time
end_time="2023-01-15 07:20:42" # Valid End Date with Date and time
sott = AuthenticationApi.get_sott(time_difference,api_key,api_secret,start_time,end_time);
print sott
We have a demo web application using the Ruby SDK, which includes the following features:
- Traditional email login
- Multi-Factor login
- Passwordless login
- Social login
- Register
- Email verification
- Forgot password
- Reset password
- Change password
- Set password
- Update account
- Account linking
- Custom object management
- Roles management
You can get a copy of our demo project at GitHub.
Follow this guide to install Ruby, and this guide to install Rails.
To know your API Key and Secret. Kindly follow the steps in the Document.
SET UP:
- Run
bundle install
- Run
bundle exec figaro install
, then configure the generated/config/application.yml
based onconfig/application.yml.example
- Run the server using
rails server
To configure the login screen implementation, create options.js
in /public/js
based on the example provided in /public/options.js.sample