Customer Identity public repo for the HTML5 SDK, based on LoginRadius V2 APIs.
LoginRadius HTML 5 Customer Registration wrapper provides access to LoginRadius Identity 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. This SDK includes support for the LoginRadius Authentication APIs, Custom Object Management APIs and Social APIs.
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.
HTML5 SDK provides an approach to access LoginRadius service with only HTML and Javascript Get a Full Demo
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.
In order to utilize the HTML5/JS SDK, you will need to initialize the SDK with your API Key:
var sdkoptions = {
"apiKey": "{{YOUR API KEY}}"
}
LoginRadiusSDK.initSDK(sdkoptions);
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.
var sdkoptions = {
"originIp": "{{CLIENT IP}}"
}
- Download the SDK from Github.
- Include the SDK javascript file on your website.
<script src="LoginRadiusV2SDK.11.3.0.js" type="text/javascript"></script>
The Access Token will be automatically retrieved from logins performed via our LoginRadiusV2.js interface.
While it is required for many of the API Calls in our Authentication API, You can simple pass it.
However, if you need to manually retrieve the token, it can be done using LoginRadiusSDK.getToken()
Note please make sure that all the API functions, are asynchronous.
With the api key initialized and the access token, once a user has logged in, we can invoke any of these functions to grab data. However, this is dependent on the provider and permissions for each.
Note: All of the listed arguments must be passed for each function if you do not want
to pass a value simply pass an empty string ""
When jsObject is listed as an argument you must pass in an Object as required for the specific API Call in our documentation.
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
This API is used to update the user's profile by passing the access token. More Info
var accessToken = "<accessToken>"; //Required
var userProfileUpdateModel ={
"firstName" : "<firstName>",
"lastName" : "<lastName>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var nullSupport = true; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.authenticationApi.updateProfileByAccessToken(accessToken, userProfileUpdateModel, emailTemplate, fields, nullSupport, smsTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var unlockProfileModel ={
"g-recaptcha-response" : "<g-recaptcha-response>"
}; //Required
LoginRadiusSDK.authenticationApi.unlockAccountByToken(accessToken, unlockProfileModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var emailVerificationByOtpModel ={
"email" : "<email>",
"otp" : "<otp>"
}; //Required
var fields = null; //Optional
var url = "<url>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.verifyEmailByOTP(emailVerificationByOtpModel, fields, url, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset password for the specified account by security question More Info
var resetPasswordBySecurityAnswerAndEmailModel ={
"email" : "<email>",
"password" : "<password>",
"securityAnswer" : {"QuestionID":"Answer"}
}; //Required
LoginRadiusSDK.authenticationApi.resetPasswordBySecurityAnswerAndEmail(resetPasswordBySecurityAnswerAndEmailModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset password for the specified account by security question More Info
var resetPasswordBySecurityAnswerAndPhoneModel ={
"password" : "<password>",
"phone" : "<phone>",
"securityAnswer" : {"QuestionID":"Answer"}
}; //Required
LoginRadiusSDK.authenticationApi.resetPasswordBySecurityAnswerAndPhone(resetPasswordBySecurityAnswerAndPhoneModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset password for the specified account by security question More Info
var resetPasswordBySecurityAnswerAndUserNameModel ={
"password" : "<password>",
"securityAnswer" : {"QuestionID":"Answer"},
"userName" : "<userName>"
}; //Required
LoginRadiusSDK.authenticationApi.resetPasswordBySecurityAnswerAndUserName(resetPasswordBySecurityAnswerAndUserNameModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to set a new password for the specified account. More Info
var resetPasswordByResetTokenModel ={
"password" : "<password>",
"resetToken" : "<resetToken>"
}; //Required
LoginRadiusSDK.authenticationApi.resetPasswordByResetToken(resetPasswordByResetTokenModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to set a new password for the specified account. More Info
var resetPasswordByEmailAndOtpModel ={
"email" : "<email>",
"otp" : "<otp>",
"password" : "<password>"
}; //Required
LoginRadiusSDK.authenticationApi.resetPasswordByEmailOTP(resetPasswordByEmailAndOtpModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var resetPasswordByUserNameModel ={
"otp" : "<otp>",
"password" : "<password>",
"userName" : "<userName>"
}; //Required
LoginRadiusSDK.authenticationApi.resetPasswordByOTPAndUserName(resetPasswordByUserNameModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to change the accounts password based on the previous password More Info
var accessToken = "<accessToken>"; //Required
var newPassword = "<newPassword>"; //Required
var oldPassword = "<oldPassword>"; //Required
LoginRadiusSDK.authenticationApi.changePassword(accessToken, newPassword, oldPassword, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to set or change UserName by access token. More Info
var accessToken = "<accessToken>"; //Required
var username = "<username>"; //Required
LoginRadiusSDK.authenticationApi.setOrChangeUserName(accessToken, username, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API resends the verification email to the user. More Info
var email = "<email>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.authenticationApi.authResendEmailVerification(email, emailTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to add additional emails to a user's account. More Info
var accessToken = "<accessToken>"; //Required
var email = "<email>"; //Required
var type = "<type>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.authenticationApi.addEmail(accessToken, email, type, emailTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API retrieves a copy of the user data based on the Email More Info
var emailAuthenticationModel ={
"email" : "<email>",
"password" : "<password>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.authenticationApi.loginByEmail(emailAuthenticationModel, emailTemplate, fields, loginUrl, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API retrieves a copy of the user data based on the Username More Info
var userNameAuthenticationModel ={
"password" : "<password>",
"username" : "<username>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.authenticationApi.loginByUserName(userNameAuthenticationModel, emailTemplate, fields, loginUrl, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var email = "<email>"; //Required
var resetPasswordUrl = "<resetPasswordUrl>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.forgotPassword(email, resetPasswordUrl, emailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var candidateToken = "<candidateToken>"; //Required
LoginRadiusSDK.authenticationApi.linkSocialIdentities(accessToken, candidateToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var clientGuid = "<clientGuid>"; //Required
LoginRadiusSDK.authenticationApi.linkSocialIdentitiesByPing(accessToken, clientGuid, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API creates a user in the database as well as sends a verification email to the user. More Info
var authUserRegistrationModel ={
"email" : [ {
"type" : "<type>" ,
"value" : "<value>"
} ] ,
"firstName" : "<firstName>",
"lastName" : "<lastName>",
"password" : "<password>"
}; //Required
var sott = "<sott>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var options = "<options>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.userRegistrationByEmail(authUserRegistrationModel, sott, emailTemplate, fields, options, verificationUrl, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API creates a user in the database as well as sends a verification email to the user. More Info
var authUserRegistrationModelWithCaptcha ={
"email" : [ {
"type" : "<type>" ,
"value" : "<value>"
} ] ,
"firstName" : "<firstName>",
"g-recaptcha-response" : "<g-recaptcha-response>",
"lastName" : "<lastName>",
"password" : "<password>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var options = "<options>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.userRegistrationByCaptcha(authUserRegistrationModelWithCaptcha, emailTemplate, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. More Info
var email = "<email>"; //Required
LoginRadiusSDK.authenticationApi.getSecurityQuestionsByEmail(email, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. More Info
var userName = "<userName>"; //Required
LoginRadiusSDK.authenticationApi.getSecurityQuestionsByUserName(userName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. More Info
var phone = "<phone>"; //Required
LoginRadiusSDK.authenticationApi.getSecurityQuestionsByPhone(phone, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve the list of questions that are configured on the respective LoginRadius site. More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.authenticationApi.getSecurityQuestionsByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This api validates access token, if valid then returns a response with its expiry otherwise error. More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.authenticationApi.authValidateAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This api call invalidates the active access token or expires an access token's validity. More Info
var accessToken = "<accessToken>"; //Required
var preventRefresh = true; //Optional
LoginRadiusSDK.authenticationApi.authInValidateAccessToken(accessToken, preventRefresh, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This api call provide the active access token Information More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.authenticationApi.getAccessTokenInfo(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API retrieves a copy of the user data based on the access token. More Info
var accessToken = "<accessToken>"; //Required
var fields = null; //Optional
var emailTemplate = "<emailTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.getProfileByAccessToken(accessToken, fields,emailTemplate, verificationUrl, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API sends a welcome email More Info
var accessToken = "<accessToken>"; //Required
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.sendWelcomeEmail(accessToken, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to delete an account by passing it a delete token. More Info
var deletetoken = "<deletetoken>"; //Required
LoginRadiusSDK.authenticationApi.deleteAccountByDeleteToken(deletetoken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to get a user's profile using the clientGuid parameter if no callback feature enabled. More Info
var clientGuid = "<clientGuid>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.getProfileByPing(clientGuid, emailTemplate, fields, verificationUrl, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to check the email exists or not on your site. More Info
var email = "<email>"; //Required
LoginRadiusSDK.authenticationApi.checkEmailAvailability(email, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var verificationToken = "<verificationToken>"; //Required
var fields = null; //Optional
var url = "<url>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.verifyEmail(verificationToken, fields, url, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to check the UserName exists or not on your site. More Info
var username = "<username>"; //Required
LoginRadiusSDK.authenticationApi.checkUserNameAvailability(username, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var fields = null; //Optional
LoginRadiusSDK.authenticationApi.acceptPrivacyPolicy(accessToken, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API will return all the accepted privacy policies for the user by providing the access token of that user. More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.authenticationApi.getPrivacyPolicyHistoryByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API will send a confirmation email for account deletion to the customer's email when passed the customer's access token More Info
var accessToken = "<accessToken>"; //Required
var deleteUrl = "<deleteUrl>"; //Optional
var emailTemplate = "<emailTemplate>"; //Optional
LoginRadiusSDK.authenticationApi.deleteAccountWithEmailConfirmation(accessToken, deleteUrl, emailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to remove additional emails from a user's account. More Info
var accessToken = "<accessToken>"; //Required
var email = "<email>"; //Required
LoginRadiusSDK.authenticationApi.removeEmail(accessToken, email, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var provider = "<provider>"; //Required
var providerId = "<providerId>"; //Required
LoginRadiusSDK.authenticationApi.unlinkSocialIdentities(accessToken, provider, providerId, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
List of APIs in this Section:
- PUT : Custom Object Update by Access Token
- POST : Create Custom Object by Token
- GET : Custom Object by Token
- GET : Custom Object by ObjectRecordId and Token
- DELETE : Custom Object Delete by Record Id And Token
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
var accessToken = "<accessToken>"; //Required
var objectName = "<objectName>"; //Required
var objectRecordId = "<objectRecordId>"; //Required
var object = { "customdata1": "Store my customdata1 value" }; //Required
var updateType = "<updateType>"; //Optional
LoginRadiusSDK.customObjectApi.updateCustomObjectByToken(accessToken, objectName, objectRecordId, object, updateType, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to write information in JSON format to the custom object for the specified account. More Info
var accessToken = "<accessToken>"; //Required
var objectName = "<objectName>"; //Required
var object = { "customdata1": "Store my customdata1 value" }; //Required
LoginRadiusSDK.customObjectApi.createCustomObjectByToken(accessToken, objectName, object, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve the specified Custom Object data for the specified account. More Info
var accessToken = "<accessToken>"; //Required
var objectName = "<objectName>"; //Required
LoginRadiusSDK.customObjectApi.getCustomObjectByToken(accessToken, objectName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve the Custom Object data for the specified account. More Info
var accessToken = "<accessToken>"; //Required
var objectName = "<objectName>"; //Required
var objectRecordId = "<objectRecordId>"; //Required
LoginRadiusSDK.customObjectApi.getCustomObjectByRecordIDAndToken(accessToken, objectName, objectRecordId, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to remove the specified Custom Object data using ObjectRecordId of a specified account. More Info
var accessToken = "<accessToken>"; //Required
var objectName = "<objectName>"; //Required
var objectRecordId = "<objectRecordId>"; //Required
LoginRadiusSDK.customObjectApi.deleteCustomObjectByToken(accessToken, objectName, objectRecordId, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
This API is used to reset the password More Info
var resetPasswordByOTPModel ={
"otp" : "<otp>",
"password" : "<password>",
"phone" : "<phone>"
}; //Required
LoginRadiusSDK.phoneAuthenticationApi.resetPasswordByPhoneOTP(resetPasswordByOTPModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to validate the verification code sent to verify a user's phone number More Info
var otp = "<otp>"; //Required
var phone = "<phone>"; //Required
var fields = null; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.phoneVerificationByOTP(otp, phone, fields, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var otp = "<otp>"; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.phoneVerificationOTPByAccessToken(accessToken, otp, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to update the login Phone Number of users More Info
var accessToken = "<accessToken>"; //Required
var phone = "<phone>"; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.updatePhoneNumber(accessToken, phone, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API retrieves a copy of the user data based on the Phone More Info
var phoneAuthenticationModel ={
"password" : "<password>",
"phone" : "<phone>"
}; //Required
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.loginByPhone(phoneAuthenticationModel, fields, loginUrl, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to send the OTP to reset the account password. More Info
var phone = "<phone>"; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.forgotPasswordByPhoneOTP(phone, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var phone = "<phone>"; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.phoneResendVerificationOTP(phone, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var phone = "<phone>"; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.phoneResendVerificationOTPByToken(accessToken, phone, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API registers the new users into your Cloud Storage and triggers the phone verification process. More Info
var authUserRegistrationModel ={
"firstName" : "<firstName>",
"lastName" : "<lastName>",
"password" : "<password>",
"phoneId" : "<phoneId>"
}; //Required
var sott = "<sott>"; //Required
var fields = null; //Optional
var options = "<options>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.phoneAuthenticationApi.userRegistrationByPhone(authUserRegistrationModel, sott, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to check the Phone Number exists or not on your site. More Info
var phone = "<phone>"; //Required
LoginRadiusSDK.phoneAuthenticationApi.checkPhoneNumberAvailability(phone, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to delete the Phone ID on a user's account via the access token More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.phoneAuthenticationApi.removePhoneIDByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
- 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
This API is used to trigger the Multi-factor authentication settings after login for secure actions More Info
var accessToken = "<accessToken>"; //Required
var multiFactorAuthModelWithLockout ={
"otp" : "<otp>"
}; //Required
var fields = null; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaUpdateSetting(accessToken, multiFactorAuthModelWithLockout, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to Enable Multi-factor authentication by access token on user login More Info
var accessToken = "<accessToken>"; //Required
var multiFactorAuthModelByGoogleAuthenticatorCode ={
"googleAuthenticatorCode" : "<googleAuthenticatorCode>"
}; //Required
var fields = null; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaUpdateByAccessToken(accessToken, multiFactorAuthModelByGoogleAuthenticatorCode, fields, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to update the Multi-factor authentication phone number by sending the verification OTP to the provided phone number More Info
var accessToken = "<accessToken>"; //Required
var phoneNo2FA = "<phoneNo2FA>"; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaUpdatePhoneNumberByToken(accessToken, phoneNo2FA, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to set up MFA Email OTP authenticator on profile after login. More Info
var accessToken = "<accessToken>"; //Required
var multiFactorAuthModelByEmailOtpWithLockout ={
"EmailId":"emailId",
"Otp":"otp"
}; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaValidateEmailOtpByAccessToken(accessToken, multiFactorAuthModelByEmailOtpWithLockout, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to set up MFA Security Question authenticator on profile after login. More Info
var accessToken = "<accessToken>"; //Required
var securityQuestionAnswerModelByAccessToken ={
"securityquestionanswer": [
{
"QuestionId": "db7****8a73e4******bd9****8c20",
"Answer": "<answer>"
}
],
"ReplaceSecurityQuestionAnswer":true
}; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaSecurityQuestionAnswerByAccessToken(accessToken, securityQuestionAnswerModelByAccessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to login via Multi-factor authentication by passing the One Time Password received via SMS More Info
var multiFactorAuthModelWithLockout ={
"otp" : "<otp>"
}; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var fields = null; //Optional
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaValidateOTPByPhone(multiFactorAuthModelWithLockout, secondFactorAuthenticationToken, fields, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to login via Multi-factor-authentication by passing the google authenticator code. More Info
var googleAuthenticatorCode = "<googleAuthenticatorCode>"; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var fields = null; //Optional
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaValidateGoogleAuthCode(googleAuthenticatorCode, secondFactorAuthenticationToken, fields, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var multiFactorAuthModelByBackupCode ={
"backupCode" : "<backupCode>"
}; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var fields = null; //Optional
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaValidateBackupCode(multiFactorAuthModelByBackupCode, secondFactorAuthenticationToken, fields, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var phoneNo2FA = "<phoneNo2FA>"; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaUpdatePhoneNumber(phoneNo2FA, secondFactorAuthenticationToken, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to Verify MFA Email OTP by MFA Token More Info
var multiFactorAuthModelByEmailOtp ={
"EmailId":"emailId",
"Otp":"otp"
}; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaValidateEmailOtp(multiFactorAuthModelByEmailOtp, secondFactorAuthenticationToken, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to set the security questions on the profile with the MFA token when MFA flow is required. More Info
var securityQuestionAnswerUpdateModel ={
"securityquestionanswer": [
{
"QuestionId": "db7****8a73e4******bd9****8c20",
"Answer": "<answer>"
}
]
}; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaSecurityQuestionAnswer(securityQuestionAnswerUpdateModel, secondFactorAuthenticationToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API can be used to login by emailid on a Multi-factor authentication enabled LoginRadius site. More Info
var email = "<email>"; //Required
var password = "<password>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var emailTemplate2FA = "<emailTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaLoginByEmail(email, password, emailTemplate, fields, loginUrl, smsTemplate, smsTemplate2FA, verificationUrl,emailTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API can be used to login by username on a Multi-factor authentication enabled LoginRadius site. More Info
var password = "<password>"; //Required
var username = "<username>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var emailTemplate2FA = "<emailTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaLoginByUserName(password, username, emailTemplate, fields, loginUrl, smsTemplate, smsTemplate2FA, verificationUrl,emailTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API can be used to login by Phone on a Multi-factor authentication enabled LoginRadius site. More Info
var password = "<password>"; //Required
var phone = "<phone>"; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
var emailTemplate2FA = "<emailTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaLoginByPhone(password, phone, emailTemplate, fields, loginUrl, smsTemplate, smsTemplate2FA, verificationUrl,emailTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
An API designed to send the MFA Email OTP to the email. More Info
var emailIdModel ={
"EmailId":"email"
}; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var emailTemplate2FA = "<emailTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaEmailOTP(emailIdModel, secondFactorAuthenticationToken, emailTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to resending the verification OTP to the provided phone number More Info
var securityQuestionAnswerUpdateModel ={
"securityquestionanswer": [
{
"QuestionId": "db7****8a73e4******bd9****8c20",
"Answer": "<answer>"
}
]
}; //Required
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaSecurityQuestionAnswerVerification(securityQuestionAnswerUpdateModel, secondFactorAuthenticationToken, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaConfigureByAccessToken(accessToken, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaBackupCodeByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaResetBackupCodeByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is created to send the OTP to the email if email OTP authenticator is enabled in app's MFA configuration. More Info
var accessToken = "<accessToken>"; //Required
var emailId = "<emailId>"; //Required
var emailTemplate2FA = "<emailTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaEmailOtpByAccessToken(accessToken, emailId, emailTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to resending the verification OTP to the provided phone number More Info
var secondFactorAuthenticationToken = "<secondFactorAuthenticationToken>"; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.multiFactorAuthenticationApi.mfaResendOTP(secondFactorAuthenticationToken, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API Resets the Google Authenticator configurations on a given account via the access token More Info
var accessToken = "<accessToken>"; //Required
var googleauthenticator = true; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaResetGoogleAuthByToken(accessToken, googleauthenticator, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API resets the SMS Authenticator configurations on a given account via the access token. More Info
var accessToken = "<accessToken>"; //Required
var otpauthenticator = true; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaResetSMSAuthByToken(accessToken, otpauthenticator, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset the Email OTP Authenticator settings for an MFA-enabled user More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaResetEmailOtpAuthenticatorByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to Reset MFA Security Question Authenticator By Access Token More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.multiFactorAuthenticationApi.mfaResetSecurityQuestionAuthenticatorByAccessToken(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
This API is used to reset pin using reset token. More Info
var resetPINByResetToken ={
"pin" : "<pin>",
"resetToken" : "<resetToken>"
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByResetToken(resetPINByResetToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset pin using security question answer and email. More Info
var resetPINBySecurityQuestionAnswerAndEmailModel ={
"email" : "<email>",
"pin" : "<pin>",
"securityAnswer" : {"QuestionID":"Answer"}
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByEmailAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndEmailModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset pin using security question answer and username. More Info
var resetPINBySecurityQuestionAnswerAndUsernameModel ={
"pin" : "<pin>",
"securityAnswer" : {"QuestionID":"Answer"},
"username" : "<username>"
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByUsernameAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndUsernameModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset pin using security question answer and phone. More Info
var resetPINBySecurityQuestionAnswerAndPhoneModel ={
"phone" : "<phone>",
"pin" : "<pin>",
"securityAnswer" : {"QuestionID":"Answer"}
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByPhoneAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndPhoneModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to change a user's PIN using access token. More Info
var accessToken = "<accessToken>"; //Required
var changePINModel ={
"newPIN" : "<newPIN>",
"oldPIN" : "<oldPIN>"
}; //Required
LoginRadiusSDK.pinAuthenticationApi.changePINByAccessToken(accessToken, changePINModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset pin using phoneId and OTP. More Info
var resetPINByPhoneAndOTPModel ={
"otp" : "<otp>",
"phone" : "<phone>",
"pin" : "<pin>"
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByPhoneAndOtp(resetPINByPhoneAndOTPModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset pin using email and OTP. More Info
var resetPINByEmailAndOtpModel ={
"email" : "<email>",
"otp" : "<otp>",
"pin" : "<pin>"
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByEmailAndOtp(resetPINByEmailAndOtpModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to reset pin using username and OTP. More Info
var resetPINByUsernameAndOtpModel ={
"otp" : "<otp>",
"pin" : "<pin>",
"username" : "<username>"
}; //Required
LoginRadiusSDK.pinAuthenticationApi.resetPINByUsernameAndOtp(resetPINByUsernameAndOtpModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to login a user by pin and session token. More Info
var loginByPINModel ={
"pin" : "<pin>"
}; //Required
var sessionToken = "<sessionToken>"; //Required
LoginRadiusSDK.pinAuthenticationApi.pinLogin(loginByPINModel, sessionToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API sends the reset pin email to specified email address. More Info
var forgotPINLinkByEmailModel ={
"email" : "<email>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var resetPINUrl = "<resetPINUrl>"; //Optional
LoginRadiusSDK.pinAuthenticationApi.sendForgotPINEmailByEmail(forgotPINLinkByEmailModel, emailTemplate, resetPINUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API sends the reset pin email using username. More Info
var forgotPINLinkByUserNameModel ={
"userName" : "<userName>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var resetPINUrl = "<resetPINUrl>"; //Optional
LoginRadiusSDK.pinAuthenticationApi.sendForgotPINEmailByUsername(forgotPINLinkByUserNameModel, emailTemplate, resetPINUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API sends the OTP to specified phone number More Info
var forgotPINOtpByPhoneModel ={
"phone" : "<phone>"
}; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.pinAuthenticationApi.sendForgotPINSMSByPhone(forgotPINOtpByPhoneModel, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to change a user's PIN using Pin Auth token. More Info
var pinRequiredModel ={
"pin" : "<pin>"
}; //Required
var pinAuthToken = "<pinAuthToken>"; //Required
LoginRadiusSDK.pinAuthenticationApi.setPINByPinAuthToken(pinRequiredModel, pinAuthToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to invalidate pin session token. More Info
var sessionToken = "<sessionToken>"; //Required
LoginRadiusSDK.pinAuthenticationApi.inValidatePinSessionToken(sessionToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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 : MFA Re-authentication by Security Question
- GET : Multi Factor Re-Authenticate
- GET : Send MFA Re-auth Email OTP by Access Token
This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS More Info
var accessToken = "<accessToken>"; //Required
var reauthByOtpModel ={
"otp" : "<otp>"
}; //Required
LoginRadiusSDK.reAuthenticationApi.mfaReAuthenticateByOTP(accessToken, reauthByOtpModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var accessToken = "<accessToken>"; //Required
var reauthByBackupCodeModel ={
"backupCode" : "<backupCode>"
}; //Required
LoginRadiusSDK.reAuthenticationApi.mfaReAuthenticateByBackupCode(accessToken, reauthByBackupCodeModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to re-authenticate via Multi-factor-authentication by passing the google authenticator code More Info
var accessToken = "<accessToken>"; //Required
var reauthByGoogleAuthenticatorCodeModel ={
"googleAuthenticatorCode" : "<googleAuthenticatorCode>"
}; //Required
LoginRadiusSDK.reAuthenticationApi.mfaReAuthenticateByGoogleAuth(accessToken, reauthByGoogleAuthenticatorCodeModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to re-authenticate via Multi-factor-authentication by passing the password More Info
var accessToken = "<accessToken>"; //Required
var passwordEventBasedAuthModelWithLockout ={
"password" : "<password>"
}; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.reAuthenticationApi.mfaReAuthenticateByPassword(accessToken, passwordEventBasedAuthModelWithLockout, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to validate the triggered MFA authentication flow with a password. More Info
var accessToken = "<accessToken>"; //Required
var pinAuthEventBasedAuthModelWithLockout ={
"pin" : "<pin>"
}; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.reAuthenticationApi.verifyPINAuthentication(accessToken, pinAuthEventBasedAuthModelWithLockout, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to validate the triggered MFA authentication flow with an Email OTP. More Info
var accessToken = "<accessToken>"; //Required
var reauthByEmailOtpModel ={
"EmailId":"email",
"otp": "otp"
}; //Required
LoginRadiusSDK.reAuthenticationApi.reAuthValidateEmailOtp(accessToken, reauthByEmailOtpModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to validate the triggered MFA re-authentication flow with security questions answers. More Info
var accessToken = "<accessToken>"; //Required
var securityQuestionAnswerUpdateModel ={
"securityquestionanswer": [
{
"QuestionId": "db7****8a73e4******bd9****8c20",
"Answer": "<answer>"
}
]
}; //Required
LoginRadiusSDK.reAuthenticationApi.reAuthBySecurityQuestion(accessToken, securityQuestionAnswerUpdateModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to trigger the Multi-Factor Autentication workflow for the provided access token More Info
var accessToken = "<accessToken>"; //Required
var smsTemplate2FA = "<smsTemplate2FA>"; //Optional
LoginRadiusSDK.reAuthenticationApi.mfaReAuthenticate(accessToken, smsTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to send the MFA Email OTP to the email for Re-authentication More Info
var accessToken = "<accessToken>"; //Required
var emailId = "<emailId>"; //Required
var emailTemplate2FA = "<emailTemplate2FA>"; //Optional
LoginRadiusSDK.reAuthenticationApi.reAuthSendEmailOtp(accessToken, emailId, emailTemplate2FA, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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 Log by Access Token
- GET : Get Verify Consent By Access Token
This API is to update consents using access token. More Info
var accessToken = "<accessToken>"; //Required
var consentUpdateModel ={
"consents" : [ {
"consentOptionId" : "<consentOptionId>" ,
"isAccepted" : true
} ]
}; //Required
LoginRadiusSDK.consentManagementApi.updateConsentProfileByAccessToken(accessToken, consentUpdateModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is to submit consent form using consent token. More Info
var consentToken = "<consentToken>"; //Required
var consentSubmitModel ={
"data" : [ {
"consentOptionId" : "<consentOptionId>" ,
"isAccepted" : true
} ] ,
"events" : [ {
"event" : "<event>" ,
"isCustom" : true
} ]
}; //Required
LoginRadiusSDK.consentManagementApi.submitConsentByConsentToken(consentToken, consentSubmitModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
API to provide a way to end user to submit a consent form for particular event type. More Info
var accessToken = "<accessToken>"; //Required
var consentSubmitModel ={
"data" : [ {
"consentOptionId" : "<consentOptionId>" ,
"isAccepted" : true
} ] ,
"events" : [ {
"event" : "<event>" ,
"isCustom" : true
} ]
}; //Required
LoginRadiusSDK.consentManagementApi.submitConsentByAccessToken(accessToken, consentSubmitModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to fetch consent logs. More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.consentManagementApi.getConsentLogs(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to check if consent is submitted for a particular event or not. More Info
var accessToken = "<accessToken>"; //Required
var event = "<event>"; //Required
var isCustom = true; //Required
LoginRadiusSDK.consentManagementApi.verifyConsentByAccessToken(accessToken, event, isCustom, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
This API verifies the provided token for Smart Login More Info
var verificationToken = "<verificationToken>"; //Required
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.smartLoginApi.smartLoginTokenVerification(verificationToken, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API sends a Smart Login link to the user's Email Id. More Info
var clientGuid = "<clientGuid>"; //Required
var email = "<email>"; //Required
var redirectUrl = "<redirectUrl>"; //Optional
var smartLoginEmailTemplate = "<smartLoginEmailTemplate>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.smartLoginApi.smartLoginByEmail(clientGuid, email, redirectUrl, smartLoginEmailTemplate, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API sends a Smart Login link to the user's Email Id. More Info
var clientGuid = "<clientGuid>"; //Required
var username = "<username>"; //Required
var redirectUrl = "<redirectUrl>"; //Optional
var smartLoginEmailTemplate = "<smartLoginEmailTemplate>"; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.smartLoginApi.smartLoginByUserName(clientGuid, username, redirectUrl, smartLoginEmailTemplate, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to check if the Smart Login link has been clicked or not More Info
var clientGuid = "<clientGuid>"; //Required
var fields = null; //Optional
LoginRadiusSDK.smartLoginApi.smartLoginPing(clientGuid, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
This API is used to verify the otp for One Touch Login. More Info
var otp = "<otp>"; //Required
var phone = "<phone>"; //Required
var fields = null; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.oneTouchLoginApi.oneTouchLoginOTPVerification(otp, phone, fields, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to send a link to a specified email for a frictionless login/registration More Info
var oneTouchLoginByEmailModel ={
"clientguid" : "<clientguid>",
"email" : "<email>",
"g-recaptcha-response" : "<g-recaptcha-response>"
}; //Required
var oneTouchLoginEmailTemplate = "<oneTouchLoginEmailTemplate>"; //Optional
var redirecturl = "<redirecturl>"; //Optional
var welcomeemailtemplate = "<welcomeemailtemplate>"; //Optional
LoginRadiusSDK.oneTouchLoginApi.oneTouchLoginByEmail(oneTouchLoginByEmailModel, oneTouchLoginEmailTemplate, redirecturl, welcomeemailtemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to send one time password to a given phone number for a frictionless login/registration. More Info
var oneTouchLoginByPhoneModel ={
"g-recaptcha-response" : "<g-recaptcha-response>",
"phone" : "<phone>"
}; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.oneTouchLoginApi.oneTouchLoginByPhone(oneTouchLoginByPhoneModel, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API verifies the provided token for One Touch Login More Info
var verificationToken = "<verificationToken>"; //Required
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.oneTouchLoginApi.oneTouchEmailVerification(verificationToken, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to check if the One Touch Login link has been clicked or not. More Info
var clientGuid = "<clientGuid>"; //Required
var fields = null; //Optional
LoginRadiusSDK.oneTouchLoginApi.oneTouchLoginPing(clientGuid, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
This API verifies an account by OTP and allows the customer to login. More Info
var passwordLessLoginOtpModel ={
"otp" : "<otp>",
"phone" : "<phone>"
}; //Required
var fields = null; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginPhoneVerification(passwordLessLoginOtpModel, fields, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to verify the otp sent to the email when doing a passwordless login. More Info
var passwordLessLoginByEmailAndOtpModel ={
"email": "<email>",
"otp": "<otp>",
"welcomeemailtemplate": "<welcome_email_template>"
}; //Required
var fields = null; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginVerificationByEmailAndOTP(passwordLessLoginByEmailAndOtpModel, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to verify the otp sent to the email when doing a passwordless More Info
var passwordLessLoginByUserNameAndOtpModel ={
"username": "<email>",
"otp": "<otp>",
"welcomeemailtemplate": "<welcome_email_template>"
}; //Required
var fields = null; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginVerificationByUserNameAndOTP(passwordLessLoginByUserNameAndOtpModel, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
API can be used to send a One-time Passcode (OTP) provided that the account has a verified PhoneID More Info
var phone = "<phone>"; //Required
var smsTemplate = "<smsTemplate>"; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginByPhone(phone, smsTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to send a Passwordless Login verification link to the provided Email ID More Info
var email = "<email>"; //Required
var passwordLessLoginTemplate = "<passwordLessLoginTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginByEmail(email, passwordLessLoginTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to send a Passwordless Login Verification Link to a customer by providing their UserName More Info
var username = "<username>"; //Required
var passwordLessLoginTemplate = "<passwordLessLoginTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginByUserName(username, passwordLessLoginTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var verificationToken = "<verificationToken>"; //Required
var fields = null; //Optional
var welcomeEmailTemplate = "<welcomeEmailTemplate>"; //Optional
LoginRadiusSDK.passwordLessLoginApi.passwordlessLoginVerification(verificationToken, fields, welcomeEmailTemplate, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
List of APIs in this Section:
- GET : Get Server Time
- GET : Get Configurations
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
var timeDifference = 0; //Optional
LoginRadiusSDK.configurationApi.getServerInfo(timeDifference, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to get the configurations which are set in the LoginRadius Admin Console for a particular LoginRadius site/environment. More info
LoginRadiusSDK.configurationApi.getConfigurations(function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
This API retrieves a copy of the user data based on the Email More Info
var emailAuthenticationModel ={
"email" : "<email>",
"password" : "<password>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var passwordDelegation = true; //Optional
var passwordDelegationApp = "<passwordDelegationApp>"; //Optional
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaBrowserSmsTemplate = "<rbaBrowserSmsTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCitySmsTemplate = "<rbaCitySmsTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaCountrySmsTemplate = "<rbaCountrySmsTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
var rbaIpSmsTemplate = "<rbaIpSmsTemplate>"; //Optional
var rbaOneclickEmailTemplate = "<rbaOneclickEmailTemplate>"; //Optional
var rbaOTPSmsTemplate = "<rbaOTPSmsTemplate>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.riskBasedAuthenticationApi.rbaLoginByEmail(emailAuthenticationModel, emailTemplate, fields, loginUrl, passwordDelegation, passwordDelegationApp, rbaBrowserEmailTemplate, rbaBrowserSmsTemplate, rbaCityEmailTemplate, rbaCitySmsTemplate, rbaCountryEmailTemplate, rbaCountrySmsTemplate, rbaIpEmailTemplate, rbaIpSmsTemplate, rbaOneclickEmailTemplate, rbaOTPSmsTemplate, smsTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API retrieves a copy of the user data based on the Username More Info
var userNameAuthenticationModel ={
"password" : "<password>",
"username" : "<username>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var passwordDelegation = true; //Optional
var passwordDelegationApp = "<passwordDelegationApp>"; //Optional
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaBrowserSmsTemplate = "<rbaBrowserSmsTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCitySmsTemplate = "<rbaCitySmsTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaCountrySmsTemplate = "<rbaCountrySmsTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
var rbaIpSmsTemplate = "<rbaIpSmsTemplate>"; //Optional
var rbaOneclickEmailTemplate = "<rbaOneclickEmailTemplate>"; //Optional
var rbaOTPSmsTemplate = "<rbaOTPSmsTemplate>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.riskBasedAuthenticationApi.rbaLoginByUserName(userNameAuthenticationModel, emailTemplate, fields, loginUrl, passwordDelegation, passwordDelegationApp, rbaBrowserEmailTemplate, rbaBrowserSmsTemplate, rbaCityEmailTemplate, rbaCitySmsTemplate, rbaCountryEmailTemplate, rbaCountrySmsTemplate, rbaIpEmailTemplate, rbaIpSmsTemplate, rbaOneclickEmailTemplate, rbaOTPSmsTemplate, smsTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API retrieves a copy of the user data based on the Phone More Info
var phoneAuthenticationModel ={
"password" : "<password>",
"phone" : "<phone>"
}; //Required
var emailTemplate = "<emailTemplate>"; //Optional
var fields = null; //Optional
var loginUrl = "<loginUrl>"; //Optional
var passwordDelegation = true; //Optional
var passwordDelegationApp = "<passwordDelegationApp>"; //Optional
var rbaBrowserEmailTemplate = "<rbaBrowserEmailTemplate>"; //Optional
var rbaBrowserSmsTemplate = "<rbaBrowserSmsTemplate>"; //Optional
var rbaCityEmailTemplate = "<rbaCityEmailTemplate>"; //Optional
var rbaCitySmsTemplate = "<rbaCitySmsTemplate>"; //Optional
var rbaCountryEmailTemplate = "<rbaCountryEmailTemplate>"; //Optional
var rbaCountrySmsTemplate = "<rbaCountrySmsTemplate>"; //Optional
var rbaIpEmailTemplate = "<rbaIpEmailTemplate>"; //Optional
var rbaIpSmsTemplate = "<rbaIpSmsTemplate>"; //Optional
var rbaOneclickEmailTemplate = "<rbaOneclickEmailTemplate>"; //Optional
var rbaOTPSmsTemplate = "<rbaOTPSmsTemplate>"; //Optional
var smsTemplate = "<smsTemplate>"; //Optional
var verificationUrl = "<verificationUrl>"; //Optional
LoginRadiusSDK.riskBasedAuthenticationApi.rbaLoginByPhone(phoneAuthenticationModel, emailTemplate, fields, loginUrl, passwordDelegation, passwordDelegationApp, rbaBrowserEmailTemplate, rbaBrowserSmsTemplate, rbaCityEmailTemplate, rbaCitySmsTemplate, rbaCountryEmailTemplate, rbaCountrySmsTemplate, rbaIpEmailTemplate, rbaIpSmsTemplate, rbaOneclickEmailTemplate, rbaOTPSmsTemplate, smsTemplate, verificationUrl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
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
var fbAccessToken = "<fbAccessToken>"; //Required
var socialAppName = "<socialAppName>"; //Optional
LoginRadiusSDK.nativeSocialApi.getAccessTokenByFacebookAccessToken(fbAccessToken, socialAppName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var twAccessToken = "<twAccessToken>"; //Required
var twTokenSecret = "<twTokenSecret>"; //Required
var socialAppName = "<socialAppName>"; //Optional
LoginRadiusSDK.nativeSocialApi.getAccessTokenByTwitterAccessToken(twAccessToken, twTokenSecret, socialAppName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var googleAccessToken = "<googleAccessToken>"; //Required
var clientId = "<clientId>"; //Optional
var refreshToken = "<refreshToken>"; //Optional
var socialAppName = "<socialAppName>"; //Optional
LoginRadiusSDK.nativeSocialApi.getAccessTokenByGoogleAccessToken(googleAccessToken, clientId, refreshToken, socialAppName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to Get LoginRadius Access Token using google jwt id token for google native mobile login/registration. More Info
var idToken = "<idToken>"; //Required
LoginRadiusSDK.nativeSocialApi.getAccessTokenByGoogleJWTAccessToken(idToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var lnAccessToken = "<lnAccessToken>"; //Required
var socialAppName = "<socialAppName>"; //Optional
LoginRadiusSDK.nativeSocialApi.getAccessTokenByLinkedinAccessToken(lnAccessToken, socialAppName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var fsAccessToken = "<fsAccessToken>"; //Required
LoginRadiusSDK.nativeSocialApi.getAccessTokenByFoursquareAccessToken(fsAccessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var code = "<code>"; //Required
var socialAppName = "<socialAppName>"; //Optional
LoginRadiusSDK.nativeSocialApi.getAccessTokenByAppleIdCode(code, socialAppName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve a LoginRadius access token by passing in a valid WeChat OAuth Code. More Info
var code = "<code>"; //Required
LoginRadiusSDK.nativeSocialApi.getAccessTokenByWeChatCode(code, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
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
var googleAuthcode = "<googleAuthcode>"; //Required
var socialAppName = "<socialAppName>"; //Optional
LoginRadiusSDK.nativeSocialApi.getAccessTokenByGoogleAuthCode(googleAuthcode, socialAppName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
We have a demo web application using the HTML 5 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
- Update account
- Account Linking
- Custom object management
You can get a copy of our demo project at Github .
- Set your LoginRadius ApiKey & other credential in
demo/assets/js/options.js