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}}"
}
<script src="https://github.com/LoginRadius/html5-sdk/raw/master/LoginRadiusV2SDK.11.2.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:
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:
Post Message API is used to post messages to the user's contacts.
Supported Providers: Twitter, LinkedIn
The Message API is used to post messages to the user?s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.
GET & POST Message API work the same way except the API method is different More Info
var accessToken = "<accessToken>"; //Required
var message = "<message>"; //Required
var subject = "<subject>"; //Required
var to = "<to>"; //Required
LoginRadiusSDK.socialApi.postMessage(accessToken, message, subject, to, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Status API is used to update the status on the user's wall.
Supported Providers: Facebook, Twitter, LinkedIn More Info
var accessToken = "<accessToken>"; //Required
var caption = "<caption>"; //Required
var description = "<description>"; //Required
var imageurl = "<imageurl>"; //Required
var status = "<status>"; //Required
var title = "<title>"; //Required
var url = "<url>"; //Required
var shorturl = "<shorturl>"; //Optional
LoginRadiusSDK.socialApi.statusPosting(accessToken, caption, description, imageurl, status, title, url, shorturl, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.
The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.
POST Input Parameter Format: application/x-www-form-urlencoded More Info
var accessToken = "<accessToken>"; //Required
var statusModel ={
"caption" : "<caption>",
"description" : "<description>",
"imageurl" : "<imageurl>",
"status" : "<status>",
"title" : "<title>",
"url" : "<url>"
}; //Required
LoginRadiusSDK.socialApi.trackableStatusPosting(accessToken, statusModel, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
Supported Providers: Facebook, Google, Live, Vkontakte.
This API returns the photo albums associated with the passed in access tokens Social Profile. More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getAlbums(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
Supported Providers: Facebook, Google, Live, Vkontakte.
This API returns the photo albums associated with the passed in access tokens Social Profile. More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getAlbumsWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Audio API is used to get audio files data from the user's social account.
Supported Providers: Live, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getAudios(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Audio API is used to get audio files data from the user's social account.
Supported Providers: Live, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getAudiosWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Check In API is used to get check Ins data from the user's social account.
Supported Providers: Facebook, Foursquare, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getCheckIns(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Check In API is used to get check Ins data from the user's social account.
Supported Providers: Facebook, Foursquare, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getCheckInsWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Contact API is used to get contacts/friends/connections data from the user's social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius' standard data format. This API requires setting permissions in your LoginRadius Dashboard.
Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.
Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Optional
LoginRadiusSDK.socialApi.getContacts(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Event API is used to get the event data from the user's social account.
Supported Providers: Facebook, Live More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getEvents(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Event API is used to get the event data from the user's social account.
Supported Providers: Facebook, Live More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getEventsWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
Get the following user list from the user's social account.
Supported Providers: Twitter More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getFollowings(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
Get the following user list from the user's social account.
Supported Providers: Twitter More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getFollowingsWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Group API is used to get group data from the user's social account.
Supported Providers: Facebook, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getGroups(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Group API is used to get group data from the user's social account.
Supported Providers: Facebook, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getGroupsWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Like API is used to get likes data from the user's social account.
Supported Providers: Facebook More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getLikes(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Like API is used to get likes data from the user's social account.
Supported Providers: Facebook More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getLikesWithCursor(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Mention API is used to get mentions data from the user's social account.
Supported Providers: Twitter More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getMentions(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Page API is used to get the page data from the user's social account.
Supported Providers: Facebook, LinkedIn More Info
var accessToken = "<accessToken>"; //Required
var pageName = "<pageName>"; //Required
LoginRadiusSDK.socialApi.getPage(accessToken, pageName, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Photo API is used to get photo data from the user's social account.
Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
var albumId = "<albumId>"; //Required
LoginRadiusSDK.socialApi.getPhotos(accessToken, albumId, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Post API is used to get post message data from the user's social account.
Supported Providers: Facebook More Info
var accessToken = "<accessToken>"; //Required
LoginRadiusSDK.socialApi.getPosts(accessToken, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.
The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. More Info
var accessToken = "<accessToken>"; //Required
var caption = "<caption>"; //Required
var description = "<description>"; //Required
var imageurl = "<imageurl>"; //Required
var status = "<status>"; //Required
var title = "<title>"; //Required
var url = "<url>"; //Required
LoginRadiusSDK.socialApi.getTrackableStatusStats(accessToken, caption, description, imageurl, status, title, url, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The User Profile API is used to get the latest updated social profile data from the user's social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius' standard data format. This API should be called using the access token retrieved from the refresh access token API. More Info
var accessToken = "<accessToken>"; //Required
var fields = null; //Optional
LoginRadiusSDK.socialApi.getRefreshedSocialUserProfile(accessToken, fields, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
The Video API is used to get video files data from the user's social account.
Supported Providers: Facebook, Google, Live, Vkontakte More Info
var accessToken = "<accessToken>"; //Required
var nextCursor = "<nextCursor>"; //Required
LoginRadiusSDK.socialApi.getVideos(accessToken, nextCursor, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
List of APIs in this Section:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
This API allows you to validate code for a particular dropdown member. More Info
var code = "<code>"; //Required
var recordId = "<recordId>"; //Required
LoginRadiusSDK.customRegistrationDataApi.validateRegistrationDataCode(code, recordId, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
This API is used to retrieve dropdown data. More Info
var type = "<type>"; //Required
var limit = 0; //Optional
var parentId = "<parentId>"; //Optional
var skip = 0; //Optional
LoginRadiusSDK.customRegistrationDataApi.authGetRegistrationData(type, limit, parentId, skip, function(error, data){
if(error){
console.log(error);
return;
}
console.log(data);
});
List of APIs in this Section:
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:
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 Vkontakte's access token. It will be valid for the specific duration of time specified in the response. More Info
var vkAccessToken = "<vkAccessToken>"; //Required
LoginRadiusSDK.nativeSocialApi.getAccessTokenByVkontakteAccessToken(vkAccessToken, 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:
You can get a copy of our demo project at Github .
demo/assets/js/options.js