{"id":18611140,"url":"https://github.com/loginradius/node-js-sdk","last_synced_at":"2025-04-10T23:30:30.366Z","repository":{"id":774801,"uuid":"5959132","full_name":"LoginRadius/node-js-sdk","owner":"LoginRadius","description":"The LoginRadius Node JS library will let you integrate LoginRadius' customer identity platform with your Node JS application(s).","archived":false,"fork":false,"pushed_at":"2023-05-20T20:21:52.000Z","size":5028,"stargazers_count":9,"open_issues_count":8,"forks_count":23,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-14T01:50:38.644Z","etag":null,"topics":["customer-identity","hacktoberfest","loginradius","loginradius-platform","nodejs-sdk","social-login","wrapper-library"],"latest_commit_sha":null,"homepage":"https://www.loginradius.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LoginRadius.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-09-26T01:17:54.000Z","updated_at":"2024-06-26T11:05:48.101Z","dependencies_parsed_at":"2024-06-26T11:05:44.573Z","dependency_job_id":"92cf5740-d523-44e8-ac47-9ceade86526e","html_url":"https://github.com/LoginRadius/node-js-sdk","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fnode-js-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fnode-js-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fnode-js-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fnode-js-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoginRadius","download_url":"https://codeload.github.com/LoginRadius/node-js-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223449786,"owners_count":17146984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customer-identity","hacktoberfest","loginradius","loginradius-platform","nodejs-sdk","social-login","wrapper-library"],"created_at":"2024-11-07T03:12:50.003Z","updated_at":"2025-04-10T23:30:30.339Z","avatar_url":"https://github.com/LoginRadius.png","language":"JavaScript","readme":"# Node-js-sdk-v2\n\nCustomer Identity public repo for Node.js V2 SDK, based on LoginRadius V2 APIs.\n\n![Home Image](http://docs.lrcontent.com/resources/github/banner-1544x500.png)\n\n\n## Introduction ##\n\nLoginRadius Node.js Customer Registration wrapper provides access to LoginRadius Identity Management Platform API.\n\nLoginRadius 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 User Registration. You can gather a wealth of user profile data from Social Login or Traditional User Registration.\n\nLoginRadius 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.\n\nLoginRadius 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.\n\nPlease visit [here](http://www.loginradius.com/) for more information.\n\n# Installing\n\n\t$ npm install loginradius-sdk\n\n## Documentation\n-----\n\n\u003eDisclaimer\u003cbr\u003e\n\u003eThis 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.\n\nLoginRadius Combined Node SDK features a combined SDK set to encompass Social Login, User Registration, and Custom Object.\n\n\n## Getting Started\nThis document contains information and examples regarding the LoginRadius Node.js SDK. It provides guidance for working with social authentication, user profile data, and sending messages with a variety of social networks such as Facebook, Google, Twitter, Yahoo, LinkedIn, and more. \nYou can get the SDK from [here](http://github.com/LoginRadius/node-js-sdk) \n\nNote: The latest version(11.7.0) of Node js SDK works with LoginRadius V2 APIs.\n\nInstallation \u003cbr/\u003e\nrun `npm install loginradius-sdk` \u003cbr/\u003e\nConfiguration \u003cbr/\u003e\nCreate `var config` in project\n```js\n  var config = {\n      apiDomain: 'api.loginradius.com',\n      apiKey: '{{ Your API KEY }}',\n      apiSecret: '{{ Your API Secret }}',\n      siteName: '{{ Your Sitename }}',\n\t  apiRequestSigning: false,\n      proxy:{\n        host:'',\n        port:'',\n        user:'',\n        password:''\n     }\n  }\n  ```\nReplace the placeholders in the config object with your LoginRadius credentials apikey, apisecret, sitename. These can be obtained from [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret) \n\nPass the proxy configurations if you want to set Http Server Proxy Configuration through your NodeJs SDK. Host and port are required to set Http Server Proxy configuration (username and password are optional).\n\n\n### X-Origin-IP\n\nLoginRadius 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.\n\n```js\n originIp:\"{{ Client Ip }}\"\n\n```\nThe originIp will be added in `var config`\n\n### Implementation\n\nRequire the loginradius-sdk package and pass the config object.\n```js\n  var lrv2 = require('loginradius-sdk')(config);\n```\nThe below APIs will be used to implement the loginradius functionalities.\n\n  ### Authentication API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Auth Update Profile by Token](#UpdateProfileByAccessToken-put-)\u003cbr\u003e\n* PUT : [Auth Unlock Account by Access Token](#UnlockAccountByToken-put-)\u003cbr\u003e\n* PUT : [Auth Verify Email By OTP](#VerifyEmailByOTP-put-)\u003cbr\u003e\n* PUT : [Auth Reset Password by Security Answer and Email](#ResetPasswordBySecurityAnswerAndEmail-put-)\u003cbr\u003e\n* PUT : [Auth Reset Password by Security Answer and Phone](#ResetPasswordBySecurityAnswerAndPhone-put-)\u003cbr\u003e\n* PUT : [Auth Reset Password by Security Answer and UserName](#ResetPasswordBySecurityAnswerAndUserName-put-)\u003cbr\u003e\n* PUT : [Auth Reset Password by Reset Token](#ResetPasswordByResetToken-put-)\u003cbr\u003e\n* PUT : [Auth Reset Password by OTP](#ResetPasswordByEmailOTP-put-)\u003cbr\u003e\n* PUT : [Auth Reset Password by OTP and UserName](#ResetPasswordByOTPAndUserName-put-)\u003cbr\u003e\n* PUT : [Auth Change Password](#ChangePassword-put-)\u003cbr\u003e\n* PUT : [Auth Set or Change UserName](#SetOrChangeUserName-put-)\u003cbr\u003e\n* PUT : [Auth Resend Email Verification](#AuthResendEmailVerification-put-)\u003cbr\u003e\n* POST : [Auth Add Email](#AddEmail-post-)\u003cbr\u003e\n* POST : [Auth Login by Email](#LoginByEmail-post-)\u003cbr\u003e\n* POST : [Auth Login by Username](#LoginByUserName-post-)\u003cbr\u003e\n* POST : [Auth Forgot Password](#ForgotPassword-post-)\u003cbr\u003e\n* POST : [Auth Link Social Identities](#LinkSocialIdentities-post-)\u003cbr\u003e\n* POST : [Auth Link Social Identities By Ping](#LinkSocialIdentitiesByPing-post-)\u003cbr\u003e\n* POST : [Auth User Registration by Email](#UserRegistrationByEmail-post-)\u003cbr\u003e\n* POST : [Auth User Registration By Captcha](#UserRegistrationByCaptcha-post-)\u003cbr\u003e\n* GET : [Get Security Questions By Email](#GetSecurityQuestionsByEmail-get-)\u003cbr\u003e\n* GET : [Get Security Questions By UserName](#GetSecurityQuestionsByUserName-get-)\u003cbr\u003e\n* GET : [Get Security Questions By Phone](#GetSecurityQuestionsByPhone-get-)\u003cbr\u003e\n* GET : [Get Security Questions By Access Token](#GetSecurityQuestionsByAccessToken-get-)\u003cbr\u003e\n* GET : [Auth Validate Access token](#AuthValidateAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token Invalidate](#AuthInValidateAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token Info](#GetAccessTokenInfo-get-)\u003cbr\u003e\n* GET : [Auth Read all Profiles by Token](#GetProfileByAccessToken-get-)\u003cbr\u003e\n* GET : [Auth Send Welcome Email](#SendWelcomeEmail-get-)\u003cbr\u003e\n* GET : [Auth Delete Account](#DeleteAccountByDeleteToken-get-)\u003cbr\u003e\n* GET : [Get Profile By Ping](#GetProfileByPing-get-)\u003cbr\u003e\n* GET : [Auth Check Email Availability](#CheckEmailAvailability-get-)\u003cbr\u003e\n* GET : [Auth Verify Email](#VerifyEmail-get-)\u003cbr\u003e\n* GET : [Auth Check UserName Availability](#CheckUserNameAvailability-get-)\u003cbr\u003e\n* GET : [Auth Privacy Policy Accept](#AcceptPrivacyPolicy-get-)\u003cbr\u003e\n* GET : [Auth Privacy Policy History By Access Token](#GetPrivacyPolicyHistoryByAccessToken-get-)\u003cbr\u003e\n* GET : [Auth send verification Email for linking social profiles](#AuthSendVerificationEmailForLinkingSocialProfiles-get-)\u003cbr\u003e\n* DELETE : [Auth Delete Account with Email Confirmation](#DeleteAccountWithEmailConfirmation-delete-)\u003cbr\u003e\n* DELETE : [Auth Remove Email](#RemoveEmail-delete-)\u003cbr\u003e\n* DELETE : [Auth Unlink Social Identities](#UnlinkSocialIdentities-delete-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"UpdateProfileByAccessToken-put-\"\u003e Auth Update Profile by Token (PUT)\u003c/h6\u003e\n\n\n This API is used to update the user's profile by passing the access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-update-profile-by-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar userProfileUpdateModel ={ \n\"firstName\" : \"\u003cfirstName\u003e\",\n\"lastName\" : \"\u003clastName\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar nullSupport = true; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\n\nlrv2.authenticationApi.updateProfileByAccessToken(accessToken, userProfileUpdateModel, emailTemplate, fields, nullSupport, smsTemplate, verificationUrl, isVoiceOtp, options).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UnlockAccountByToken-put-\"\u003e Auth Unlock Account by Access Token (PUT)\u003c/h6\u003e\n\n This API is used to allow a customer with a valid access token to unlock their account provided that they successfully pass the prompted Bot Protection challenges. The Block or Suspend block types are not applicable for this API. For additional details see our Auth Security Configuration documentation.You are only required to pass the Post Parameters that correspond to the prompted challenges.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-unlock-account-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar unlockProfileModel ={ \n\"g-recaptcha-response\" : \"\u003cg-recaptcha-response\u003e\"\n};  //Required\n\nlrv2.authenticationApi.unlockAccountByToken(accessToken, unlockProfileModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"VerifyEmailByOTP-put-\"\u003e Auth Verify Email By OTP (PUT)\u003c/h6\u003e\n\n This API is used to verify the email of user when the OTP Email verification flow is enabled, please note that you must contact LoginRadius to have this feature enabled.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-verify-email-by-otp/)\n\n \n \n\n ```js\n\n\nvar emailVerificationByOtpModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"otp\" : \"\u003cotp\u003e\"\n};  //Required\nvar fields = null; //Optional\nvar url = \"\u003curl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.authenticationApi.verifyEmailByOTP(emailVerificationByOtpModel, fields, url, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPasswordBySecurityAnswerAndEmail-put-\"\u003e Auth Reset Password by Security Answer and Email (PUT)\u003c/h6\u003e\n\n This API is used to reset password for the specified account by security question  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-email)\n\n \n \n\n ```js\n\nvar resetPasswordBySecurityAnswerAndEmailModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"password\" : \"\u003cpassword\u003e\",\n\"securityAnswer\" : {\"QuestionID\":\"Answer\"}\n};  //Required\n\nlrv2.authenticationApi.resetPasswordBySecurityAnswerAndEmail(resetPasswordBySecurityAnswerAndEmailModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPasswordBySecurityAnswerAndPhone-put-\"\u003e Auth Reset Password by Security Answer and Phone (PUT)\u003c/h6\u003e\n\n This API is used to reset password for the specified account by security question  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-phone)\n\n \n \n\n ```js\n\n\nvar resetPasswordBySecurityAnswerAndPhoneModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"phone\" : \"\u003cphone\u003e\",\n\"securityAnswer\" : {\"QuestionID\":\"Answer\"}\n};  //Required\n\nlrv2.authenticationApi.resetPasswordBySecurityAnswerAndPhone(resetPasswordBySecurityAnswerAndPhoneModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPasswordBySecurityAnswerAndUserName-put-\"\u003e Auth Reset Password by Security Answer and UserName (PUT)\u003c/h6\u003e\n\n This API is used to reset password for the specified account by security question  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-username)\n\n \n \n\n ```js\n\n\nvar resetPasswordBySecurityAnswerAndUserNameModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"securityAnswer\" : {\"QuestionID\":\"Answer\"},\n\"userName\" : \"\u003cuserName\u003e\"\n};  //Required\n\nlrv2.authenticationApi.resetPasswordBySecurityAnswerAndUserName(resetPasswordBySecurityAnswerAndUserNameModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPasswordByResetToken-put-\"\u003e Auth Reset Password by Reset Token (PUT)\u003c/h6\u003e\n\n This API is used to set a new password for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-reset-token)\n\n \n \n\n ```js\n\n\nvar resetPasswordByResetTokenModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"resetToken\" : \"\u003cresetToken\u003e\"\n};  //Required\n\nlrv2.authenticationApi.resetPasswordByResetToken(resetPasswordByResetTokenModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPasswordByEmailOTP-put-\"\u003e Auth Reset Password by OTP (PUT)\u003c/h6\u003e\n\n This API is used to set a new password for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-otp)\n\n \n \n\n ```js\n\n\nvar resetPasswordByEmailAndOtpModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"otp\" : \"\u003cotp\u003e\",\n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\n\nlrv2.authenticationApi.resetPasswordByEmailOTP(resetPasswordByEmailAndOtpModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPasswordByOTPAndUserName-put-\"\u003e Auth Reset Password by OTP and UserName (PUT)\u003c/h6\u003e\n\n This API is used to set a new password for the specified account if you are using the username as the unique identifier in your workflow  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-reset-password-by-otp-and-username/)\n\n \n \n\n ```js\n\n\nvar resetPasswordByUserNameModel ={ \n\"otp\" : \"\u003cotp\u003e\",\n\"password\" : \"\u003cpassword\u003e\",\n\"userName\" : \"\u003cuserName\u003e\"\n};  //Required\n\nlrv2.authenticationApi.resetPasswordByOTPAndUserName(resetPasswordByUserNameModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ChangePassword-put-\"\u003e Auth Change Password (PUT)\u003c/h6\u003e\n\n This API is used to change the accounts password based on the previous password  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-change-password)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar newPassword = \"\u003cnewPassword\u003e\"; //Required\nvar oldPassword = \"\u003coldPassword\u003e\"; //Required\n\nlrv2.authenticationApi.changePassword(accessToken, newPassword, oldPassword).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SetOrChangeUserName-put-\"\u003e Auth Set or Change UserName (PUT)\u003c/h6\u003e\n\n This API is used to set or change UserName by access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-set-or-change-user-name/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar username = \"\u003cusername\u003e\"; //Required\n\nlrv2.authenticationApi.setOrChangeUserName(accessToken, username).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"AuthResendEmailVerification-put-\"\u003e Auth Resend Email Verification (PUT)\u003c/h6\u003e\n\n This API resends the verification email to the user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-resend-email-verification/)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.authenticationApi.authResendEmailVerification(email, emailTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"AddEmail-post-\"\u003e Auth Add Email (POST)\u003c/h6\u003e\n\n This API is used to add additional emails to a user's account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-add-email)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar email = \"\u003cemail\u003e\"; //Required\nvar type = \"\u003ctype\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.authenticationApi.addEmail(accessToken, email, type, emailTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"LoginByEmail-post-\"\u003e Auth Login by Email (POST)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the Email  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-email)\n\n \n \n\n ```js\n\n\nvar emailAuthenticationModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.authenticationApi.loginByEmail(emailAuthenticationModel, emailTemplate, fields, loginUrl, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"LoginByUserName-post-\"\u003e Auth Login by Username (POST)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the Username  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-username)\n\n \n \n\n ```js\n\n\nvar userNameAuthenticationModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"username\" : \"\u003cusername\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.authenticationApi.loginByUserName(userNameAuthenticationModel, emailTemplate, fields, loginUrl, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ForgotPassword-post-\"\u003e Auth Forgot Password (POST)\u003c/h6\u003e\n\n This API is used to send the reset password url to a specified account. Note: If you have the UserName workflow enabled, you may replace the 'email' parameter with 'username'  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-forgot-password)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar resetPasswordUrl = \"\u003cresetPasswordUrl\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\n\nlrv2.authenticationApi.forgotPassword(email, resetPasswordUrl, emailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"LinkSocialIdentities-post-\"\u003e Auth Link Social Identities (POST)\u003c/h6\u003e\n\n This API is used to link up a social provider account with an existing LoginRadius account on the basis of access token and the social providers user access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar candidateToken = \"\u003ccandidateToken\u003e\"; //Required\n\nlrv2.authenticationApi.linkSocialIdentities(accessToken, candidateToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"LinkSocialIdentitiesByPing-post-\"\u003e Auth Link Social Identities By Ping (POST)\u003c/h6\u003e\n\n This API is used to link up a social provider account with an existing LoginRadius account on the basis of ping and the social providers user access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-link-social-identities-by-ping)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar clientGuid = \"\u003cclientGuid\u003e\"; //Required\n\nlrv2.authenticationApi.linkSocialIdentitiesByPing(accessToken, clientGuid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UserRegistrationByEmail-post-\"\u003e Auth User Registration by Email (POST)\u003c/h6\u003e\n\n This API creates a user in the database as well as sends a verification email to the user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-user-registration-by-email)\n\n \n \n\n ```js\n\n\nvar authUserRegistrationModel ={ \n\"email\" : [   { \n \"type\" : \"\u003ctype\u003e\"  ,\n \"value\" : \"\u003cvalue\u003e\"   \n}  ] ,\n\"firstName\" : \"\u003cfirstName\u003e\",\n\"lastName\" : \"\u003clastName\u003e\",\n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\nvar sott = \"\u003csott\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.authenticationApi.userRegistrationByEmail(authUserRegistrationModel, sott, emailTemplate, fields, options, verificationUrl, welcomeEmailTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UserRegistrationByCaptcha-post-\"\u003e Auth User Registration By Captcha (POST)\u003c/h6\u003e\n\n This API creates a user in the database as well as sends a verification email to the user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-user-registration-by-recaptcha)\n\n \n \n\n ```js\n\n\nvar authUserRegistrationModelWithCaptcha ={ \n\"email\" : [   { \n \"type\" : \"\u003ctype\u003e\"  ,\n \"value\" : \"\u003cvalue\u003e\"   \n}  ] ,\n\"firstName\" : \"\u003cfirstName\u003e\",\n\"g-recaptcha-response\" : \"\u003cg-recaptcha-response\u003e\",\n\"lastName\" : \"\u003clastName\u003e\",\n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.authenticationApi.userRegistrationByCaptcha(authUserRegistrationModelWithCaptcha, emailTemplate, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetSecurityQuestionsByEmail-get-\"\u003e Get Security Questions By Email (GET)\u003c/h6\u003e\n\n This API is used to retrieve the list of questions that are configured on the respective LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-email/)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\n\nlrv2.authenticationApi.getSecurityQuestionsByEmail(email).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetSecurityQuestionsByUserName-get-\"\u003e Get Security Questions By UserName (GET)\u003c/h6\u003e\n\n This API is used to retrieve the list of questions that are configured on the respective LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-user-name/)\n\n \n \n\n ```js\n\nvar userName = \"\u003cuserName\u003e\"; //Required\n\nlrv2.authenticationApi.getSecurityQuestionsByUserName(userName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetSecurityQuestionsByPhone-get-\"\u003e Get Security Questions By Phone (GET)\u003c/h6\u003e\n\n This API is used to retrieve the list of questions that are configured on the respective LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-phone/)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\n\nlrv2.authenticationApi.getSecurityQuestionsByPhone(phone).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetSecurityQuestionsByAccessToken-get-\"\u003e Get Security Questions By Access Token (GET)\u003c/h6\u003e\n\n This API is used to retrieve the list of questions that are configured on the respective LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/security-questions-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.authenticationApi.getSecurityQuestionsByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"AuthValidateAccessToken-get-\"\u003e Auth Validate Access token (GET)\u003c/h6\u003e\n\n This api validates access token, if valid then returns a response with its expiry otherwise error.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-validate-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.authenticationApi.authValidateAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"AuthInValidateAccessToken-get-\"\u003e Access Token Invalidate (GET)\u003c/h6\u003e\n\n This api call invalidates the active access token or expires an access token's validity.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-invalidate-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar preventRefresh = true; //Optional\n\nlrv2.authenticationApi.authInValidateAccessToken(accessToken, preventRefresh).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenInfo-get-\"\u003e Access Token Info (GET)\u003c/h6\u003e\n\n This api call provide the active access token Information  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-access-token-info/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.authenticationApi.getAccessTokenInfo(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetProfileByAccessToken-get-\"\u003e Auth Read all Profiles by Token (GET)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-read-profiles-by-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.authenticationApi.getProfileByAccessToken(accessToken, emailTemplate, fields, verificationUrl, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SendWelcomeEmail-get-\"\u003e Auth Send Welcome Email (GET)\u003c/h6\u003e\n\n This API sends a welcome email  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-send-welcome-email/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.authenticationApi.sendWelcomeEmail(accessToken, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteAccountByDeleteToken-get-\"\u003e Auth Delete Account (GET)\u003c/h6\u003e\n\n This API is used to delete an account by passing it a delete token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-delete-account/)\n\n \n \n\n ```js\n\nvar deletetoken = \"\u003cdeletetoken\u003e\"; //Required\n\nlrv2.authenticationApi.deleteAccountByDeleteToken(deletetoken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n \u003ch6 id=\"GetProfileByPing-get-\"\u003eGet Profile By Ping (GET)\u003c/h6\u003e\n\nThis API is used to get a user's profile using the clientGuid parameter if no callback feature enabled. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/social-login-by-ping/)\n\n \n\n ```js\n\nvar clientGuid = \"\u003cclientGuid\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.authenticationApi.getProfileByPing(clientGuid, emailTemplate, fields, verificationUrl, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ``` \n  \n \n\u003ch6 id=\"CheckEmailAvailability-get-\"\u003e Auth Check Email Availability (GET)\u003c/h6\u003e\n\n This API is used to check the email exists or not on your site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-email-availability/)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\n\nlrv2.authenticationApi.checkEmailAvailability(email).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"VerifyEmail-get-\"\u003e Auth Verify Email (GET)\u003c/h6\u003e\n\n This API is used to verify the email of user. Note: This API will only return the full profile if you have 'Enable auto login after email verification' set in your LoginRadius Admin Console's Email Workflow settings under 'Verification Email'.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-verify-email/)\n\n \n \n\n ```js\n\nvar verificationToken = \"\u003cverificationToken\u003e\"; //Required\nvar fields = null; //Optional\nvar url = \"\u003curl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nvar uuid = \"\u003cuuid\u003e\"; //Optional\n\nlrv2.authenticationApi.verifyEmail(verificationToken, fields, url, welcomeEmailTemplate, uuid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"CheckUserNameAvailability-get-\"\u003e Auth Check UserName Availability (GET)\u003c/h6\u003e\n\n This API is used to check the UserName exists or not on your site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-username-availability/)\n\n \n \n\n ```js\n\nvar username = \"\u003cusername\u003e\"; //Required\n\nlrv2.authenticationApi.checkUserNameAvailability(username).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"AcceptPrivacyPolicy-get-\"\u003e Auth Privacy Policy Accept (GET)\u003c/h6\u003e\n\n This API is used to update the privacy policy stored in the user's profile by providing the access token of the user accepting the privacy policy  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-privacy-policy-accept)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.authenticationApi.acceptPrivacyPolicy(accessToken, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetPrivacyPolicyHistoryByAccessToken-get-\"\u003e Auth Privacy Policy History By Access Token (GET)\u003c/h6\u003e\n\n This API will return all the accepted privacy policies for the user by providing the access token of that user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/privacy-policy-history-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.authenticationApi.getPrivacyPolicyHistoryByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\n \u003ch6 id=\"AuthSendVerificationEmailForLinkingSocialProfiles-get-\"\u003e Auth send verification Email for linking social profiles (GET)\u003c/h6\u003e\n\n This API is used to Send verification email to the unverified email of the social profile. This API can be used only incase of optional verification workflow.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-send-verification-for-social-email/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar clientguid = \"\u003cclientguid\u003e\"; //Required\n\nlrv2.authenticationApi.authSendVerificationEmailForLinkingSocialProfiles(accessToken, clientguid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n  \n  \n \n\u003ch6 id=\"DeleteAccountWithEmailConfirmation-delete-\"\u003e Auth Delete Account with Email Confirmation (DELETE)\u003c/h6\u003e\n\n This API will send a confirmation email for account deletion to the customer's email when passed the customer's access token  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-delete-account-with-email-confirmation/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar deleteUrl = \"\u003cdeleteUrl\u003e\"; //Optional\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\n\nlrv2.authenticationApi.deleteAccountWithEmailConfirmation(accessToken, deleteUrl, emailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RemoveEmail-delete-\"\u003e Auth Remove Email (DELETE)\u003c/h6\u003e\n\n This API is used to remove additional emails from a user's account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-remove-email)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar email = \"\u003cemail\u003e\"; //Required\n\nlrv2.authenticationApi.removeEmail(accessToken, email).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UnlinkSocialIdentities-delete-\"\u003e Auth Unlink Social Identities (DELETE)\u003c/h6\u003e\n\n This API is used to unlink up a social provider account with the specified account based on the access token and the social providers user access token. The unlinked account will automatically get removed from your database.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-unlink-social-identities)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar provider = \"\u003cprovider\u003e\"; //Required\nvar providerId = \"\u003cproviderId\u003e\"; //Required\n\nlrv2.authenticationApi.unlinkSocialIdentities(accessToken, provider, providerId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### Account API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Account Update](#UpdateAccountByUid-put-)\u003cbr\u003e\n* PUT : [Update Phone ID by UID](#UpdatePhoneIDByUid-put-)\u003cbr\u003e\n* PUT : [Account Set Password](#SetAccountPasswordByUid-put-)\u003cbr\u003e\n* PUT : [Account Invalidate Verification Email](#InvalidateAccountEmailVerification-put-)\u003cbr\u003e\n* PUT : [Reset phone ID verification](#ResetPhoneIDVerificationByUid-put-)\u003cbr\u003e\n* PUT : [Upsert Email](#UpsertEmail-put-)\u003cbr\u003e\n* PUT : [Update UID](#AccountUpdateUid-put-)\u003cbr\u003e\n* POST : [Account Create](#CreateAccount-post-)\u003cbr\u003e\n* POST : [Forgot Password token](#GetForgotPasswordToken-post-)\u003cbr\u003e\n* POST : [Email Verification token](#GetEmailVerificationToken-post-)\u003cbr\u003e\n* POST : [Multipurpose Email Token Generation API](#MultipurposeEmailTokenGeneration-post-)\u003cbr\u003e\n* POST : [Multipurpose SMS OTP Generation API](#MultipurposeSMSOTPGeneration-post-)\u003cbr\u003e\n* GET : [Get Privacy Policy History By Uid](#GetPrivacyPolicyHistoryByUid-get-)\u003cbr\u003e\n* GET : [Account Profiles by Email](#GetAccountProfileByEmail-get-)\u003cbr\u003e\n* GET : [Account Profiles by Username](#GetAccountProfileByUserName-get-)\u003cbr\u003e\n* GET : [Account Profile by Phone ID](#GetAccountProfileByPhone-get-)\u003cbr\u003e\n* GET : [Account Profiles by UID](#GetAccountProfileByUid-get-)\u003cbr\u003e\n* GET : [Account Password](#GetAccountPasswordHashByUid-get-)\u003cbr\u003e\n* GET : [Access Token based on UID or User impersonation API](#GetAccessTokenByUid-get-)\u003cbr\u003e\n* GET : [Refresh Access Token by Refresh Token](#RefreshAccessTokenByRefreshToken-get-)\u003cbr\u003e\n* GET : [Revoke Refresh Token](#RevokeRefreshToken-get-)\u003cbr\u003e\n* GET : [Account Identities by Email](#GetAccountIdentitiesByEmail-get-)\u003cbr\u003e\n* DELETE : [Account Delete](#DeleteAccountByUid-delete-)\u003cbr\u003e\n* DELETE : [Account Remove Email](#RemoveEmail-delete-)\u003cbr\u003e\n* DELETE : [Revoke All Refresh Token](#RevokeAllRefreshToken-delete-)\u003cbr\u003e\n* DELETE : [Delete User Profiles By Email](#AccountDeleteByEmail-delete-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"UpdateAccountByUid-put-\"\u003e Account Update (PUT)\u003c/h6\u003e\n\n This API is used to update the information of existing accounts in your Cloud Storage. See our Advanced API Usage section \u003ca href='https://www.loginradius.com/docs/api/v2/customer-identity-api/advanced-api-usage/'\u003eHere\u003c/a\u003e for more capabilities.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-update)\n\n \n \n\n ```js\n\nvar accountUserProfileUpdateModel ={ \n\"firstName\" : \"\u003cfirstName\u003e\",\n\"lastName\" : \"\u003clastName\u003e\"\n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\nvar fields = null; //Optional\nvar nullSupport = true; //Optional\n\nlrv2.accountApi.updateAccountByUid(accountUserProfileUpdateModel, uid, fields, nullSupport).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UpdatePhoneIDByUid-put-\"\u003e Update Phone ID by UID (PUT)\u003c/h6\u003e\n\n This API is used to update the PhoneId by using the Uid's. Admin can update the PhoneId's for both the verified and unverified profiles. It will directly replace the PhoneId and bypass the OTP verification process.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/update-phoneid-by-uid)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.updatePhoneIDByUid(phone, uid, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SetAccountPasswordByUid-put-\"\u003e Account Set Password (PUT)\u003c/h6\u003e\n\n This API is used to set the password of an account in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-set-password)\n\n \n \n\n ```js\n\nvar password = \"\u003cpassword\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.setAccountPasswordByUid(password, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"InvalidateAccountEmailVerification-put-\"\u003e Account Invalidate Verification Email (PUT)\u003c/h6\u003e\n\n This API is used to invalidate the Email Verification status on an account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-invalidate-verification-email)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.accountApi.invalidateAccountEmailVerification(uid, emailTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPhoneIDVerificationByUid-put-\"\u003e Reset phone ID verification (PUT)\u003c/h6\u003e\n\n This API Allows you to reset the phone no verification of an end user’s account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/reset-phone-id-verification)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.accountApi.resetPhoneIDVerificationByUid(uid, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UpsertEmail-put-\"\u003e Upsert Email (PUT)\u003c/h6\u003e\n\n This API is used to add/upsert another emails in account profile by different-different email types. If the email type is same then it will simply update the existing email, otherwise it will add a new email in Email array.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/upsert-email)\n\n \n \n\n ```js\nvar upsertEmailModel ={ \n\"email\" : [   { \n \"type\" : \"\u003ctype\u003e\"  ,\n \"value\" : \"\u003cvalue\u003e\"   \n}  ] \n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.upsertEmail(upsertEmailModel, uid, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\u003ch6 id=\"AccountUpdateUid-put-\"\u003e Update UID (PUT)\u003c/h6\u003e\n\n This API is used to update a user's Uid. It will update all profiles, custom objects and consent management logs associated with the Uid.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-update/)\n\n \n \n\n ```js\nvar updateUidModel ={ \n\"newUid\" : \"\u003cnewUid\u003e\"\n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.accountUpdateUid(updateUidModel, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n \n\u003ch6 id=\"CreateAccount-post-\"\u003e Account Create (POST)\u003c/h6\u003e\n\n This API is used to create an account in Cloud Storage. This API bypass the normal email verification process and manually creates the user. \u003cbr\u003e\u003cbr\u003eIn order to use this API, you need to format a JSON request body with all of the mandatory fields  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-create)\n\n \n \n\n ```js\nvar accountCreateModel ={ \n\"email\" : [   { \n \"type\" : \"\u003ctype\u003e\"  ,\n \"value\" : \"\u003cvalue\u003e\"   \n}  ] ,\n\"firstName\" : \"\u003cfirstName\u003e\",\n\"lastName\" : \"\u003clastName\u003e\",\n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.createAccount(accountCreateModel, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetForgotPasswordToken-post-\"\u003e Forgot Password token (POST)\u003c/h6\u003e\n\n This API Returns a Forgot Password Token it can also be used to send a Forgot Password email to the customer. Note: If you have the UserName workflow enabled, you may replace the 'email' parameter with 'username' in the body.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/get-forgot-password-token)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar resetPasswordUrl = \"\u003cresetPasswordUrl\u003e\"; //Optional\nvar sendEmail = true; //Optional\n\nlrv2.accountApi.getForgotPasswordToken(email, emailTemplate, resetPasswordUrl, sendEmail).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetEmailVerificationToken-post-\"\u003e Email Verification token (POST)\u003c/h6\u003e\n\n This API Returns an Email Verification token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/get-email-verification-token)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\n\nlrv2.accountApi.getEmailVerificationToken(email).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n\n\n  \n\u003ch6 id=\"MultipurposeEmailTokenGeneration-post-\"\u003e Multipurpose Email Token Generation API (POST)\u003c/h6\u003e\n\n This API generate Email tokens and Email OTPs for Email verification, Add email, Forgot password, Delete user, Passwordless login, Forgot pin, One-touch login and Auto login.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/multipurpose-token-and-sms-otp-generation-api/multipurpose-email-token-generation/)\n\n \n \n\n ```Js\n\n\nvar multiEmailToken ={ \n\"clientguid\" : \"\u003cclientguid\u003e\",\n\"email\" : \"\u003cemail\u003e\",\n\"name\" : \"\u003cname\u003e\",\n\"type\" : \"\u003ctype\u003e\",\n\"uid\" : \"\u003cuid\u003e\",\n\"userName\" : \"\u003cuserName\u003e\"\n};  //Required\nvar tokentype = \"\u003ctokentype\u003e\"; //Required\n\nlrv2.accountApi.multipurposeEmailTokenGeneration(multiEmailToken, tokentype).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MultipurposeSMSOTPGeneration-post-\"\u003e Multipurpose SMS OTP Generation API (POST)\u003c/h6\u003e\n\n This API generates SMS OTP for Add phone, Phone Id verification, Forgot password, Forgot pin, One-touch login, smart login and Passwordless login.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/multipurpose-token-and-sms-otp-generation-api/multipurpose-sms-otp-generation/)\n\n \n \n\n ```Js\n\n\nvar multiSmsOtp ={ \n\"name\" : \"\u003cname\u003e\",\n\"phone\" : \"\u003cphone\u003e\",\n\"uid\" : \"\u003cuid\u003e\"\n};  //Required\nvar smsotptype = \"\u003csmsotptype\u003e\"; //Required\n\nlrv2.accountApi.multipurposeSMSOTPGeneration(multiSmsOtp, smsotptype).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetPrivacyPolicyHistoryByUid-get-\"\u003e Get Privacy Policy History By Uid (GET)\u003c/h6\u003e\n\n This API is used to retrieve all of the accepted Policies by the user, associated with their UID.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/privacy-policy-history-by-uid/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.getPrivacyPolicyHistoryByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccountProfileByEmail-get-\"\u003e Account Profiles by Email (GET)\u003c/h6\u003e\n\n This API is used to retrieve all of the profile data, associated with the specified account by email in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-email)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.getAccountProfileByEmail(email, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccountProfileByUserName-get-\"\u003e Account Profiles by Username (GET)\u003c/h6\u003e\n\n This API is used to retrieve all of the profile data associated with the specified account by user name in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-user-name)\n\n \n \n\n ```js\n\nvar userName = \"\u003cuserName\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.getAccountProfileByUserName(userName, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccountProfileByPhone-get-\"\u003e Account Profile by Phone ID (GET)\u003c/h6\u003e\n\n This API is used to retrieve all of the profile data, associated with the account by phone number in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-phone-id/)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.getAccountProfileByPhone(phone, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccountProfileByUid-get-\"\u003e Account Profiles by UID (GET)\u003c/h6\u003e\n\n This API is used to retrieve all of the profile data, associated with the account by uid in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-profiles-by-uid)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.getAccountProfileByUid(uid, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccountPasswordHashByUid-get-\"\u003e Account Password (GET)\u003c/h6\u003e\n\n This API use to retrive the hashed password of a specified account in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-password)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.getAccountPasswordHashByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByUid-get-\"\u003e Access Token based on UID or User impersonation API (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token based on UID.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-impersonation-api)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.getAccessTokenByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RefreshAccessTokenByRefreshToken-get-\"\u003e Refresh Access Token by Refresh Token (GET)\u003c/h6\u003e\n\n This API is used to refresh an access token via it's associated refresh token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-access-token-by-refresh-token)\n\n \n \n\n ```js\n\nvar refreshToken = \"\u003crefreshToken\u003e\"; //Required\n\nlrv2.accountApi.refreshAccessTokenByRefreshToken(refreshToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RevokeRefreshToken-get-\"\u003e Revoke Refresh Token (GET)\u003c/h6\u003e\n\n The Revoke Refresh Access Token API is used to revoke a refresh token or the Provider Access Token, revoking an existing refresh token will invalidate the refresh token but the associated access token will work until the expiry.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/revoke-refresh-token)\n\n \n \n\n ```js\n\nvar refreshToken = \"\u003crefreshToken\u003e\"; //Required\n\nlrv2.accountApi.revokeRefreshToken(refreshToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccountIdentitiesByEmail-get-\"\u003e Account Identities by Email (GET)\u003c/h6\u003e\n\n Note: This is intended for specific workflows where an email may be associated to multiple UIDs. This API is used to retrieve all of the identities (UID and Profiles), associated with a specified email in Cloud Storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-identities-by-email)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.getAccountIdentitiesByEmail(email, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteAccountByUid-delete-\"\u003e Account Delete (DELETE)\u003c/h6\u003e\n\n This API deletes the Users account and allows them to re-register for a new account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-delete)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.deleteAccountByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RemoveEmail-delete-\"\u003e Account Remove Email (DELETE)\u003c/h6\u003e\n\n Use this API to Remove emails from a user Account  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-email-delete)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.accountApi.removeEmail(email, uid, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\u003ch6 id=\"RevokeAllRefreshToken-delete-\"\u003e Revoke All Refresh Token (DELETE)\u003c/h6\u003e\n\n The Revoke All Refresh Access Token API is used to revoke all refresh tokens for a specific user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/revoke-all-refresh-token/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.accountApi.revokeAllRefreshToken(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n  \n \n\u003ch6 id=\"AccountDeleteByEmail-delete-\"\u003e Delete User Profiles By Email (DELETE)\u003c/h6\u003e\n\n This API is used to delete all user profiles associated with an Email.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-email-delete/)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\n\nlrv2.accountApi.accountDeleteByEmail(email).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### Social API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* GET : [Access Token](#ExchangeAccessToken-get-)\u003cbr\u003e\n* GET : [Refresh Token](#RefreshAccessToken-get-)\u003cbr\u003e\n* GET : [Token Validate](#ValidateAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token Invalidate](#InValidateAccessToken-get-)\u003cbr\u003e\n* GET : [Get Active Session Details](#GetActiveSession-get-)\u003cbr\u003e\n* GET : [Get Active Session By Account Id](#GetActiveSessionByAccountID-get-)\u003cbr\u003e\n* GET : [Get Active Session By Profile Id](#GetActiveSessionByProfileID-get-)\u003cbr\u003e\n \n  \n  \n \n\u003ch6 id=\"ExchangeAccessToken-get-\"\u003e Access Token (GET)\u003c/h6\u003e\n\n This API Is used to translate the Request Token returned during authentication into an Access Token that can be used with other API calls.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/access-token)\n\n \n \n\n ```js\n\nvar token = \"\u003ctoken\u003e\"; //Required\n\nlrv2.socialApi.exchangeAccessToken(token).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RefreshAccessToken-get-\"\u003e Refresh Token (GET)\u003c/h6\u003e\n\n The Refresh Access Token API is used to refresh the provider access token after authentication. It will be valid for up to 60 days on LoginRadius depending on the provider. In order to use the access token in other APIs, always refresh the token using this API.\u003cbr\u003e\u003cbr\u003e\u003cb\u003eSupported Providers :\u003c/b\u003e Facebook,Yahoo,Google,Twitter, Linkedin.\u003cbr\u003e\u003cbr\u003e Contact LoginRadius support team to enable this API.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar expiresIn = 0; //Optional\nvar isWeb = true; //Optional\n\nlrv2.socialApi.refreshAccessToken(accessToken, expiresIn, isWeb).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ValidateAccessToken-get-\"\u003e Token Validate (GET)\u003c/h6\u003e\n\n This API validates access token, if valid then returns a response with its expiry otherwise error.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/validate-access-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.socialApi.validateAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"InValidateAccessToken-get-\"\u003e Access Token Invalidate (GET)\u003c/h6\u003e\n\n This api invalidates the active access token or expires an access token validity.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/invalidate-access-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.socialApi.inValidateAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetActiveSession-get-\"\u003e Get Active Session Details (GET)\u003c/h6\u003e\n\n This api is use to get all active session by Access Token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/get-active-session-details)\n\n \n \n\n ```js\n\nvar token = \"\u003ctoken\u003e\"; //Required\n\nlrv2.socialApi.getActiveSession(token).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetActiveSessionByAccountID-get-\"\u003e Get Active Session By Account Id (GET)\u003c/h6\u003e\n\n This api is used to get all active sessions by AccountID(UID).  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/active-session-by-account-id/)\n\n \n \n\n ```js\n\nvar accountId = \"\u003caccountId\u003e\"; //Required\n\nlrv2.socialApi.getActiveSessionByAccountID(accountId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetActiveSessionByProfileID-get-\"\u003e Get Active Session By Profile Id (GET)\u003c/h6\u003e\n\n This api is used to get all active sessions by ProfileId.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/active-session-by-profile-id/)\n\n \n \n\n ```js\n\nvar profileId = \"\u003cprofileId\u003e\"; //Required\n\nlrv2.socialApi.getActiveSessionByProfileID(profileId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### CustomObject API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Custom Object Update by Access Token](#UpdateCustomObjectByToken-put-)\u003cbr\u003e\n* PUT : [Custom Object Update by UID](#UpdateCustomObjectByUid-put-)\u003cbr\u003e\n* POST : [Create Custom Object by Token](#CreateCustomObjectByToken-post-)\u003cbr\u003e\n* POST : [Create Custom Object by UID](#CreateCustomObjectByUid-post-)\u003cbr\u003e\n* GET : [Custom Object by Token](#GetCustomObjectByToken-get-)\u003cbr\u003e\n* GET : [Custom Object by ObjectRecordId and Token](#GetCustomObjectByRecordIDAndToken-get-)\u003cbr\u003e\n* GET : [Custom Object By UID](#GetCustomObjectByUid-get-)\u003cbr\u003e\n* GET : [Custom Object by ObjectRecordId and UID](#GetCustomObjectByRecordID-get-)\u003cbr\u003e\n* DELETE : [Custom Object Delete by Record Id And Token](#DeleteCustomObjectByToken-delete-)\u003cbr\u003e\n* DELETE : [Account Delete Custom Object by ObjectRecordId](#DeleteCustomObjectByRecordID-delete-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"UpdateCustomObjectByToken-put-\"\u003e Custom Object Update by Access Token (PUT)\u003c/h6\u003e\n\n This API is used to update the specified custom object data of the specified account. If the value of updatetype is 'replace' then it will fully replace custom object with the new custom object and if the value of updatetype is 'partialreplace' then it will perform an upsert type operation  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-update-by-objectrecordid-and-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\n\nvar object = { \"customdata1\": \"Store my customdata1 value\" };  //Required\nvar updateType = \"\u003cupdateType\u003e\"; //Optional\n\nlrv2.customObjectApi.updateCustomObjectByToken(accessToken, objectName, objectRecordId, object, updateType).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UpdateCustomObjectByUid-put-\"\u003e Custom Object Update by UID (PUT)\u003c/h6\u003e\n\n This API is used to update the specified custom object data of a specified account. If the value of updatetype is 'replace' then it will fully replace custom object with new custom object and if the value of updatetype is partialreplace then it will perform an upsert type operation.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-update-by-objectrecordid-and-uid)\n\n \n \n\n ```js\n\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\n\nvar object = { \"customdata1\": \"Store my customdata1 value\" };  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\nvar updateType = \"\u003cupdateType\u003e\"; //Optional\n\nlrv2.customObjectApi.updateCustomObjectByUid(objectName, objectRecordId, object, uid, updateType).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"CreateCustomObjectByToken-post-\"\u003e Create Custom Object by Token (POST)\u003c/h6\u003e\n\n This API is used to write information in JSON format to the custom object for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/create-custom-object-by-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar objectName = \"\u003cobjectName\u003e\"; //Required\n\nvar object = { \"customdata1\": \"Store my customdata1 value\" };  //Required\n\nlrv2.customObjectApi.createCustomObjectByToken(accessToken, objectName, object).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"CreateCustomObjectByUid-post-\"\u003e Create Custom Object by UID (POST)\u003c/h6\u003e\n\n This API is used to write information in JSON format to the custom object for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/create-custom-object-by-uid)\n\n \n \n\n ```js\n\nvar objectName = \"\u003cobjectName\u003e\"; //Required\n\nvar object = { \"customdata1\": \"Store my customdata1 value\" };  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.customObjectApi.createCustomObjectByUid(objectName, object, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetCustomObjectByToken-get-\"\u003e Custom Object by Token (GET)\u003c/h6\u003e\n\n This API is used to retrieve the specified Custom Object data for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar objectName = \"\u003cobjectName\u003e\"; //Required\n\nlrv2.customObjectApi.getCustomObjectByToken(accessToken, objectName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetCustomObjectByRecordIDAndToken-get-\"\u003e Custom Object by ObjectRecordId and Token (GET)\u003c/h6\u003e\n\n This API is used to retrieve the Custom Object data for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-objectrecordid-and-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\n\nlrv2.customObjectApi.getCustomObjectByRecordIDAndToken(accessToken, objectName, objectRecordId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetCustomObjectByUid-get-\"\u003e Custom Object By UID (GET)\u003c/h6\u003e\n\n This API is used to retrieve all the custom objects by UID from cloud storage.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-uid)\n\n \n \n\n ```js\n\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.customObjectApi.getCustomObjectByUid(objectName, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetCustomObjectByRecordID-get-\"\u003e Custom Object by ObjectRecordId and UID (GET)\u003c/h6\u003e\n\n This API is used to retrieve the Custom Object data for the specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-by-objectrecordid-and-uid)\n\n \n \n\n ```js\n\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.customObjectApi.getCustomObjectByRecordID(objectName, objectRecordId, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteCustomObjectByToken-delete-\"\u003e Custom Object Delete by Record Id And Token (DELETE)\u003c/h6\u003e\n\n This API is used to remove the specified Custom Object data using ObjectRecordId of a specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-delete-by-objectrecordid-and-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\n\nlrv2.customObjectApi.deleteCustomObjectByToken(accessToken, objectName, objectRecordId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteCustomObjectByRecordID-delete-\"\u003e Account Delete Custom Object by ObjectRecordId (DELETE)\u003c/h6\u003e\n\n This API is used to remove the specified Custom Object data using ObjectRecordId of specified account.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/custom-object/custom-object-delete-by-objectrecordid-and-uid)\n\n \n \n\n ```js\n\nvar objectName = \"\u003cobjectName\u003e\"; //Required\nvar objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.customObjectApi.deleteCustomObjectByRecordID(objectName, objectRecordId, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### PhoneAuthentication API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Phone Reset Password by OTP](#ResetPasswordByPhoneOTP-put-)\u003cbr\u003e\n* PUT : [Phone Verification OTP](#PhoneVerificationByOTP-put-)\u003cbr\u003e\n* PUT : [Phone Verification OTP by Token](#PhoneVerificationOTPByAccessToken-put-)\u003cbr\u003e\n* PUT : [Phone Number Update](#UpdatePhoneNumber-put-)\u003cbr\u003e\n* POST : [Phone Login](#LoginByPhone-post-)\u003cbr\u003e\n* POST : [Phone Forgot Password by OTP](#ForgotPasswordByPhoneOTP-post-)\u003cbr\u003e\n* POST : [Phone Resend Verification OTP](#PhoneResendVerificationOTP-post-)\u003cbr\u003e\n* POST : [Phone Resend Verification OTP By Token](#PhoneResendVerificationOTPByToken-post-)\u003cbr\u003e\n* POST : [Phone User Registration by SMS](#UserRegistrationByPhone-post-)\u003cbr\u003e\n* GET : [Phone Number Availability](#CheckPhoneNumberAvailability-get-)\u003cbr\u003e\n* DELETE : [Remove Phone ID by Access Token](#RemovePhoneIDByAccessToken-delete-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"ResetPasswordByPhoneOTP-put-\"\u003e Phone Reset Password by OTP (PUT)\u003c/h6\u003e\n\n This API is used to reset the password  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-reset-password-by-otp)\n\n \n \n\n ```js\n\nvar resetPasswordByOTPModel ={ \n\"otp\" : \"\u003cotp\u003e\",\n\"password\" : \"\u003cpassword\u003e\",\n\"phone\" : \"\u003cphone\u003e\"\n};  //Required\n\nlrv2.phoneAuthenticationApi.resetPasswordByPhoneOTP(resetPasswordByOTPModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PhoneVerificationByOTP-put-\"\u003e Phone Verification OTP (PUT)\u003c/h6\u003e\n\n This API is used to validate the verification code sent to verify a user's phone number  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-verify-otp)\n\n \n \n\n ```js\n\nvar otp = \"\u003cotp\u003e\"; //Required\nvar phone = \"\u003cphone\u003e\"; //Required\nvar fields = null; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.phoneAuthenticationApi.phoneVerificationByOTP(otp, phone, fields, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PhoneVerificationOTPByAccessToken-put-\"\u003e Phone Verification OTP by Token (PUT)\u003c/h6\u003e\n\n This API is used to consume the verification code sent to verify a user's phone number. Use this call for front-end purposes in cases where the user is already logged in by passing the user's access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-verify-otp-by-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar otp = \"\u003cotp\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.phoneAuthenticationApi.phoneVerificationOTPByAccessToken(accessToken, otp, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UpdatePhoneNumber-put-\"\u003e Phone Number Update (PUT)\u003c/h6\u003e\n\n This API is used to update the login Phone Number of users  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-number-update)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar phone = \"\u003cphone\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.phoneAuthenticationApi.updatePhoneNumber(accessToken, phone, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"LoginByPhone-post-\"\u003e Phone Login (POST)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the Phone  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-login)\n\n \n \n\n ```js\n\nvar phoneAuthenticationModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"phone\" : \"\u003cphone\u003e\"\n};  //Required\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\n\nlrv2.phoneAuthenticationApi.loginByPhone(phoneAuthenticationModel, fields, loginUrl, smsTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ForgotPasswordByPhoneOTP-post-\"\u003e Phone Forgot Password by OTP (POST)\u003c/h6\u003e\n\n This API is used to send the OTP to reset the account password.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-forgot-password-by-otp)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.phoneAuthenticationApi.forgotPasswordByPhoneOTP(phone, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PhoneResendVerificationOTP-post-\"\u003e Phone Resend Verification OTP (POST)\u003c/h6\u003e\n\n This API is used to resend a verification OTP to verify a user's Phone Number. The user will receive a verification code that they will need to input  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-resend-otp)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.phoneAuthenticationApi.phoneResendVerificationOTP(phone, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PhoneResendVerificationOTPByToken-post-\"\u003e Phone Resend Verification OTP By Token (POST)\u003c/h6\u003e\n\n This API is used to resend a verification OTP to verify a user's Phone Number in cases in which an active token already exists  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-resend-otp-by-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar phone = \"\u003cphone\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\n\nlrv2.phoneAuthenticationApi.phoneResendVerificationOTPByToken(accessToken, phone, smsTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UserRegistrationByPhone-post-\"\u003e Phone User Registration by SMS (POST)\u003c/h6\u003e\n\n This API registers the new users into your Cloud Storage and triggers the phone verification process.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-user-registration-by-sms)\n\n \n \n\n ```js\n\nvar authUserRegistrationModel ={ \n\"firstName\" : \"\u003cfirstName\u003e\",\n\"lastName\" : \"\u003clastName\u003e\",\n\"password\" : \"\u003cpassword\u003e\",\n\"phoneId\" : \"\u003cphoneId\u003e\"\n};  //Required\nvar sott = \"\u003csott\u003e\"; //Required\nvar fields = null; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.phoneAuthenticationApi.userRegistrationByPhone(authUserRegistrationModel, sott, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate, emailTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"CheckPhoneNumberAvailability-get-\"\u003e Phone Number Availability (GET)\u003c/h6\u003e\n\n This API is used to check the Phone Number exists or not on your site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-number-availability)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\n\nlrv2.phoneAuthenticationApi.checkPhoneNumberAvailability(phone).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RemovePhoneIDByAccessToken-delete-\"\u003e Remove Phone ID by Access Token (DELETE)\u003c/h6\u003e\n\n This API is used to delete the Phone ID on a user's account via the access token  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/remove-phone-id-by-access-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.phoneAuthenticationApi.removePhoneIDByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### MultiFactorAuthentication API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Update MFA Setting](#MFAUpdateSetting-put-)\u003cbr\u003e\n* PUT : [MFA Update Phone Number by Token](#MFAUpdatePhoneNumberByToken-put-)\u003cbr\u003e\n* PUT : [Verify MFA Email OTP by Access Token](#MFAValidateEmailOtpByAccessToken-put-)\u003cbr\u003e\n* PUT : [Update MFA Security Question by Access Token](#MFASecurityQuestionAnswerByAccessToken-put-)\u003cbr\u003e\n* PUT : [MFA Validate OTP](#MFAValidateOTPByPhone-put-)\u003cbr\u003e\n* PUT : [MFA Validate Backup code](#MFAValidateBackupCode-put-)\u003cbr\u003e\n* PUT : [MFA Update Phone Number](#MFAUpdatePhoneNumber-put-)\u003cbr\u003e\n* PUT : [Verify MFA Email OTP by MFA Token](#MFAValidateEmailOtp-put-)\u003cbr\u003e\n* PUT : [Update MFA Security Question by MFA Token](#MFASecurityQuestionAnswer-put-)\u003cbr\u003e\n* PUT : [MFA Validate Authenticator Code](#MFAValidateAuthenticatorCode-put-)\u003cbr\u003e\n* PUT : [MFA Verify Authenticator Code](#MFAVerifyAuthenticatorCode-put-)\u003cbr\u003e\n* POST : [MFA Email Login](#MFALoginByEmail-post-)\u003cbr\u003e\n* POST : [MFA UserName Login](#MFALoginByUserName-post-)\u003cbr\u003e\n* POST : [MFA Phone Login](#MFALoginByPhone-post-)\u003cbr\u003e\n* POST : [Send MFA Email OTP by MFA Token](#MFAEmailOTP-post-)\u003cbr\u003e\n* POST : [Verify MFA Security Question by MFA Token](#MFASecurityQuestionAnswerVerification-post-)\u003cbr\u003e\n* GET : [MFA Validate Access Token](#MFAConfigureByAccessToken-get-)\u003cbr\u003e\n* GET : [MFA Backup Code by Access Token](#MFABackupCodeByAccessToken-get-)\u003cbr\u003e\n* GET : [Reset Backup Code by Access Token](#MFAResetBackupCodeByAccessToken-get-)\u003cbr\u003e\n* GET : [Send MFA Email OTP by Access Token](#MFAEmailOtpByAccessToken-get-)\u003cbr\u003e\n* GET : [MFA Resend Otp](#MFAResendOTP-get-)\u003cbr\u003e\n* GET : [MFA Backup Code by UID](#MFABackupCodeByUid-get-)\u003cbr\u003e\n* GET : [MFA Reset Backup Code by UID](#MFAResetBackupCodeByUid-get-)\u003cbr\u003e\n* DELETE : [MFA Reset Authenticator by Token](#MFAResetAuthenticatorByToken-delete-)\u003cbr\u003e\n* DELETE : [MFA Reset SMS Authenticator by Token](#MFAResetSMSAuthByToken-delete-)\u003cbr\u003e\n* DELETE : [Reset MFA Email OTP Authenticator By Access Token](#MFAResetEmailOtpAuthenticatorByAccessToken-delete-)\u003cbr\u003e\n* DELETE : [MFA Reset Security Question Authenticator By Access Token](#MFAResetSecurityQuestionAuthenticatorByAccessToken-delete-)\u003cbr\u003e\n* DELETE : [MFA Reset SMS Authenticator By UID](#MFAResetSMSAuthenticatorByUid-delete-)\u003cbr\u003e\n* DELETE : [MFA Reset Authenticator By UID](#MFAResetAuthenticatorByUid-delete-)\u003cbr\u003e\n* DELETE : [Reset MFA Email OTP Authenticator Settings by Uid](#MFAResetEmailOtpAuthenticatorByUid-delete-)\u003cbr\u003e\n* DELETE : [Reset MFA Security Question Authenticator Settings by Uid](#MFAResetSecurityQuestionAuthenticatorByUid-delete-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"MFAUpdateSetting-put-\"\u003e Update MFA Setting (PUT)\u003c/h6\u003e\n\n This API is used to trigger the Multi-factor authentication settings after login for secure actions  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/update-mfa-setting/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar multiFactorAuthModelWithLockout ={ \n\"otp\" : \"\u003cotp\u003e\"\n};  //Required\nvar fields = null; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaUpdateSetting(accessToken, multiFactorAuthModelWithLockout, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n \n  \n  \n \n\u003ch6 id=\"MFAUpdatePhoneNumberByToken-put-\"\u003e MFA Update Phone Number by Token (PUT)\u003c/h6\u003e\n\n This API is used to update the Multi-factor authentication phone number by sending the verification OTP to the provided phone number  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-update-phone-number-by-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar phoneNo2FA = \"\u003cphoneNo2FA\u003e\"; //Required\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaUpdatePhoneNumberByToken(accessToken, phoneNo2FA, smsTemplate2FA, isVoiceOtp,options).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAValidateEmailOtpByAccessToken-put-\"\u003e Verify MFA Email OTP by Access Token (PUT)\u003c/h6\u003e\n\n This API is used to set up MFA Email OTP authenticator on profile after login.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/verify-mfa-otp-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar multiFactorAuthModelByEmailOtpWithLockout ={ \n\"EmailId\":\"emailId\",\n\"Otp\":\"otp\"\n  };  //Required\n\nlrv2.multiFactorAuthenticationApi.mfaValidateEmailOtpByAccessToken(accessToken, multiFactorAuthModelByEmailOtpWithLockout).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFASecurityQuestionAnswerByAccessToken-put-\"\u003e Update MFA Security Question by Access Token (PUT)\u003c/h6\u003e\n\n This API is used to set up MFA Security Question authenticator on profile after login.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/update-mfa-security-question-by-access-token)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar securityQuestionAnswerModelByAccessToken ={  \n     \"securityquestionanswer\": [\n        {\n            \"QuestionId\": \"db7****8a73e4******bd9****8c20\",\n            \"Answer\": \"\u003canswer\u003e\"\n        }\n    ],\n     \"ReplaceSecurityQuestionAnswer\":false // required\n };  //Required\n\nlrv2.multiFactorAuthenticationApi.mfaSecurityQuestionAnswerByAccessToken(accessToken, securityQuestionAnswerModelByAccessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAValidateOTPByPhone-put-\"\u003e MFA Validate OTP (PUT)\u003c/h6\u003e\n\n This API is used to login via Multi-factor authentication by passing the One Time Password received via SMS  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-validate-otp/)\n\n \n \n\n ```js\n\nvar multiFactorAuthModelWithLockout ={ \n\"otp\" : \"\u003cotp\u003e\"\n};  //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar fields = null; //Optional\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaValidateOTPByPhone(multiFactorAuthModelWithLockout, secondFactorAuthenticationToken, fields,smsTemplate2FA, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n\n \n  \n  \n \n\u003ch6 id=\"MFAValidateBackupCode-put-\"\u003e MFA Validate Backup code (PUT)\u003c/h6\u003e\n\n This API is used to validate the backup code provided by the user and if valid, we return an access token allowing the user to login incases where Multi-factor authentication (MFA) is enabled and the secondary factor is unavailable. When a user initially downloads the Backup codes, We generate 10 codes, each code can only be consumed once. if any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-validate-backup-code/)\n\n \n \n\n ```js\n\nvar multiFactorAuthModelByBackupCode ={ \n\"backupCode\" : \"\u003cbackupCode\u003e\"\n};  //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar fields = null; //Optional\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaValidateBackupCode(multiFactorAuthModelByBackupCode, secondFactorAuthenticationToken, fields, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAUpdatePhoneNumber-put-\"\u003e MFA Update Phone Number (PUT)\u003c/h6\u003e\n\n This API is used to update (if configured) the phone number used for Multi-factor authentication by sending the verification OTP to the provided phone number  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-update-phone-number/)\n\n \n \n\n ```js\n\nvar phoneNo2FA = \"\u003cphoneNo2FA\u003e\"; //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaUpdatePhoneNumber(phoneNo2FA, secondFactorAuthenticationToken, smsTemplate2FA, isVoiceOtp, options).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAValidateEmailOtp-put-\"\u003e Verify MFA Email OTP by MFA Token (PUT)\u003c/h6\u003e\n\n This API is used to Verify MFA Email OTP by MFA Token  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/verify-mfa-email-otp-by-mfa-token/)\n\n \n \n\n ```js\n\nvar multiFactorAuthModelByEmailOtp ={ \n    \"EmailId\":\"email\",\n    \"Otp\":\"otp\"\n  };  //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaValidateEmailOtp(multiFactorAuthModelByEmailOtp, secondFactorAuthenticationToken, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFASecurityQuestionAnswer-put-\"\u003e Update MFA Security Question by MFA Token (PUT)\u003c/h6\u003e\n\n This API is used to set the security questions on the profile with the MFA token when MFA flow is required.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/update-mfa-security-question-by-mfa-token/)\n\n \n \n\n ```js\n\nvar securityQuestionAnswerUpdateModel ={  \n    \"securityquestionanswer\": [\n        {\n            \"QuestionId\": \"db7****8a73e4******bd9****8c20\",\n            \"Answer\": \"\u003canswer\u003e\"\n        }\n    ]\n };  //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaSecurityQuestionAnswer(securityQuestionAnswerUpdateModel, secondFactorAuthenticationToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n\n\u003ch6 id=\"MFAValidateAuthenticatorCode-put-\"\u003e MFA Validate Authenticator Code (PUT)\u003c/h6\u003e\n\n This API is used to login to a user's account during the second MFA step with an Authenticator Code.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/authenticator/mfa-validate-authenticator-code/)\n\n \n \n\n ```js\n\n\nvar multiFactorAuthModelByAuthenticatorCode ={  \n    \"authenticatorCode\" : \"\u003cauthenticatorCode\u003e\"\n };  //Required\nvar secondfactorauthenticationtoken = \"\u003csecondfactorauthenticationtoken\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaValidateAuthenticatorCode(multiFactorAuthModelByAuthenticatorCode, secondfactorauthenticationtoken, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAVerifyAuthenticatorCode-put-\"\u003e MFA Verify Authenticator Code (PUT)\u003c/h6\u003e\n\n This API is used to validate an Authenticator Code as part of the MFA process.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/authenticator/mfa-verify-authenticator-code/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar multiFactorAuthModelByAuthenticatorCodeSecurityAnswer ={ \n\"authenticatorCode\" : \"\u003cauthenticatorCode\u003e\"\n};  //Required\nvar fields = null; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaVerifyAuthenticatorCode(accessToken, multiFactorAuthModelByAuthenticatorCodeSecurityAnswer, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFALoginByEmail-post-\"\u003e MFA Email Login (POST)\u003c/h6\u003e\n\n This API can be used to login by emailid on a Multi-factor authentication enabled LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-email-login)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar password = \"\u003cpassword\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar emailTemplate2FA = \"\u003cemailTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaLoginByEmail(email, password, emailTemplate, fields, loginUrl, smsTemplate, smsTemplate2FA, verificationUrl,emailTemplate2FA, isVoiceOtp,options).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFALoginByUserName-post-\"\u003e MFA UserName Login (POST)\u003c/h6\u003e\n\n This API can be used to login by username on a Multi-factor authentication enabled LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-user-name-login)\n\n \n \n\n ```js\n\nvar password = \"\u003cpassword\u003e\"; //Required\nvar username = \"\u003cusername\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar emailTemplate2FA = \"\u003cemailTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaLoginByUserName(password, username, emailTemplate, fields, loginUrl, smsTemplate, smsTemplate2FA, verificationUrl, emailTemplate2FA, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFALoginByPhone-post-\"\u003e MFA Phone Login (POST)\u003c/h6\u003e\n\n This API can be used to login by Phone on a Multi-factor authentication enabled LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-phone-login)\n\n \n \n\n ```js\n\nvar password = \"\u003cpassword\u003e\"; //Required\nvar phone = \"\u003cphone\u003e\"; //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nvar emailTemplate2FA = \"\u003cemailTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\nvar options = \"\u003coptions\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaLoginByPhone(password, phone, emailTemplate, fields, loginUrl, smsTemplate, smsTemplate2FA, verificationUrl,emailTemplate2FA, isVoiceOtp, options).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAEmailOTP-post-\"\u003e Send MFA Email OTP by MFA Token (POST)\u003c/h6\u003e\n\n An API designed to send the MFA Email OTP to the email.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/send-mfa-email-otp-by-mfa-token/)\n\n \n \n\n ```js\n\nvar emailIdModel ={  \n\"EmailId\":\"email\"\n };  //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar emailTemplate2FA = \"\u003cemailTemplate2FA\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaEmailOTP(emailIdModel, secondFactorAuthenticationToken, emailTemplate2FA).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFASecurityQuestionAnswerVerification-post-\"\u003e Verify MFA Security Question by MFA Token (POST)\u003c/h6\u003e\n\n This API is used to resending the verification OTP to the provided phone number  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/verify-mfa-security-question-by-mfa-token/)\n\n \n \n\n ```js\n\nvar securityQuestionAnswerUpdateModel ={ \n      \"securityquestionanswer\": [\n        {\n            \"QuestionId\": \"db7****8a73e4******bd9****8c20\",\n            \"Answer\": \"\u003canswer\u003e\"\n        }\n    ]\n  };  //Required\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaSecurityQuestionAnswerVerification(securityQuestionAnswerUpdateModel, secondFactorAuthenticationToken, rbaBrowserEmailTemplate, rbaCityEmailTemplate, rbaCountryEmailTemplate, rbaIpEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAConfigureByAccessToken-get-\"\u003e MFA Validate Access Token (GET)\u003c/h6\u003e\n\n This API is used to configure the Multi-factor authentication after login by using the access token when MFA is set as optional on the LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/mfa-validate-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar isVoiceOtp = true; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaConfigureByAccessToken(accessToken, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFABackupCodeByAccessToken-get-\"\u003e MFA Backup Code by Access Token (GET)\u003c/h6\u003e\n\n This API is used to get a set of backup codes via access token to allow the user login on a site that has Multi-factor Authentication enabled in the event that the user does not have a secondary factor available. We generate 10 codes, each code can only be consumed once. If any user attempts to go over the number of invalid login attempts configured in the Dashboard then the account gets blocked automatically  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaBackupCodeByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetBackupCodeByAccessToken-get-\"\u003e Reset Backup Code by Access Token (GET)\u003c/h6\u003e\n\n API is used to reset the backup codes on a given account via the access token. This API call will generate 10 new codes, each code can only be consumed once  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-reset-backup-code-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetBackupCodeByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAEmailOtpByAccessToken-get-\"\u003e Send MFA Email OTP by Access Token (GET)\u003c/h6\u003e\n\n This API is created to send the OTP to the email if email OTP authenticator is enabled in app's MFA configuration.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/send-mfa-email-otp-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar emailId = \"\u003cemailId\u003e\"; //Required\nvar emailTemplate2FA = \"\u003cemailTemplate2FA\u003e\"; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaEmailOtpByAccessToken(accessToken, emailId, emailTemplate2FA).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResendOTP-get-\"\u003e MFA Resend Otp (GET)\u003c/h6\u003e\n\n This API is used to resending the verification OTP to the provided phone number  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/resend-twofactorauthentication-otp/)\n\n \n \n\n ```js\n\nvar secondFactorAuthenticationToken = \"\u003csecondFactorAuthenticationToken\u003e\"; //Required\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.multiFactorAuthenticationApi.mfaResendOTP(secondFactorAuthenticationToken, smsTemplate2FA, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFABackupCodeByUid-get-\"\u003e MFA Backup Code by UID (GET)\u003c/h6\u003e\n\n This API is used to reset the backup codes on a given account via the UID. This API call will generate 10 new codes, each code can only be consumed once.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-backup-code-by-uid/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaBackupCodeByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetBackupCodeByUid-get-\"\u003e MFA Reset Backup Code by UID (GET)\u003c/h6\u003e\n\n This API is used to reset the backup codes on a given account via the UID. This API call will generate 10 new codes, each code can only be consumed once.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/mfa-reset-backup-code-by-uid/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetBackupCodeByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n \u003ch6 id=\"MFAResetAuthenticatorByToken-delete-\"\u003e MFA Reset Authenticator by Token (DELETE)\u003c/h6\u003e\n\n This API Resets the Authenticator configurations on a given account via the access_token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/authenticator/mfa-reset-authenticator-by-token/)\n\n \n \n\n ```Js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar authenticator = true; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetAuthenticatorByToken(accessToken, authenticator).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetSMSAuthByToken-delete-\"\u003e MFA Reset SMS Authenticator by Token (DELETE)\u003c/h6\u003e\n\n This API resets the SMS Authenticator configurations on a given account via the access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-reset-sms-authenticator-by-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar otpauthenticator = true; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetSMSAuthByToken(accessToken, otpauthenticator).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetEmailOtpAuthenticatorByAccessToken-delete-\"\u003e Reset MFA Email OTP Authenticator By Access Token (DELETE)\u003c/h6\u003e\n\n This API is used to reset the Email OTP Authenticator settings for an MFA-enabled user  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/reset-mfa-email-otp-authenticator-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetEmailOtpAuthenticatorByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetSecurityQuestionAuthenticatorByAccessToken-delete-\"\u003e MFA Reset Security Question Authenticator By Access Token (DELETE)\u003c/h6\u003e\n\n This API is used to Reset MFA Security Question Authenticator By Access Token  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/reset-mfa-security-question-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetSecurityQuestionAuthenticatorByAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetSMSAuthenticatorByUid-delete-\"\u003e MFA Reset SMS Authenticator By UID (DELETE)\u003c/h6\u003e\n\n This API resets the SMS Authenticator configurations on a given account via the UID.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/sms-authenticator/mfa-reset-sms-authenticator-by-uid/)\n\n \n \n\n ```js\n\nvar otpauthenticator = true; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetSMSAuthenticatorByUid(otpauthenticator, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n\u003ch6 id=\"MFAResetAuthenticatorByUid-delete-\"\u003e MFA Reset Authenticator By UID (DELETE)\u003c/h6\u003e\n\n This API resets the Authenticator configurations on a given account via the UID.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/authenticator/mfa-reset-authenticator-by-uid/)\n\n \n \n\n ```Js\n\nvar authenticator = true; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetAuthenticatorByUid(authenticator, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetEmailOtpAuthenticatorByUid-delete-\"\u003e Reset MFA Email OTP Authenticator Settings by Uid (DELETE)\u003c/h6\u003e\n\n This API is used to reset the Email OTP Authenticator settings for an MFA-enabled user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/reset-mfa-email-otp-authenticator-settings-by-uid/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetEmailOtpAuthenticatorByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAResetSecurityQuestionAuthenticatorByUid-delete-\"\u003e Reset MFA Security Question Authenticator Settings by Uid (DELETE)\u003c/h6\u003e\n\n This API is used to reset the Security Question Authenticator settings for an MFA-enabled user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/backup-codes/reset-mfa-security-question-authenticator-settings-by-uid/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.multiFactorAuthenticationApi.mfaResetSecurityQuestionAuthenticatorByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### PINAuthentication API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Reset PIN By ResetToken](#ResetPINByResetToken-put-)\u003cbr\u003e\n* PUT : [Reset PIN By SecurityAnswer And Email](#ResetPINByEmailAndSecurityAnswer-put-)\u003cbr\u003e\n* PUT : [Reset PIN By SecurityAnswer And Username](#ResetPINByUsernameAndSecurityAnswer-put-)\u003cbr\u003e\n* PUT : [Reset PIN By SecurityAnswer And Phone](#ResetPINByPhoneAndSecurityAnswer-put-)\u003cbr\u003e\n* PUT : [Change PIN By Token](#ChangePINByAccessToken-put-)\u003cbr\u003e\n* PUT : [Reset PIN by Phone and OTP](#ResetPINByPhoneAndOtp-put-)\u003cbr\u003e\n* PUT : [Reset PIN by Email and OTP](#ResetPINByEmailAndOtp-put-)\u003cbr\u003e\n* PUT : [Reset PIN by Username and OTP](#ResetPINByUsernameAndOtp-put-)\u003cbr\u003e\n* POST : [PIN Login](#PINLogin-post-)\u003cbr\u003e\n* POST : [Forgot PIN By Email](#SendForgotPINEmailByEmail-post-)\u003cbr\u003e\n* POST : [Forgot PIN By UserName](#SendForgotPINEmailByUsername-post-)\u003cbr\u003e\n* POST : [Forgot PIN By Phone](#SendForgotPINSMSByPhone-post-)\u003cbr\u003e\n* POST : [Set PIN By PinAuthToken](#SetPINByPinAuthToken-post-)\u003cbr\u003e\n* GET : [Invalidate PIN Session Token](#InValidatePinSessionToken-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"ResetPINByResetToken-put-\"\u003e Reset PIN By ResetToken (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using reset token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-resettoken/)\n\n \n \n\n ```js\n\nvar resetPINByResetToken ={ \n\"pin\" : \"\u003cpin\u003e\",\n\"resetToken\" : \"\u003cresetToken\u003e\"\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByResetToken(resetPINByResetToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPINByEmailAndSecurityAnswer-put-\"\u003e Reset PIN By SecurityAnswer And Email (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using security question answer and email.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-email/)\n\n \n \n\n ```js\n\nvar resetPINBySecurityQuestionAnswerAndEmailModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"pin\" : \"\u003cpin\u003e\",\n\"securityAnswer\" : {\"QuestionID\":\"Answer\"}\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByEmailAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndEmailModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPINByUsernameAndSecurityAnswer-put-\"\u003e Reset PIN By SecurityAnswer And Username (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using security question answer and username.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-username/)\n\n \n \n\n ```js\n\nvar resetPINBySecurityQuestionAnswerAndUsernameModel ={ \n\"pin\" : \"\u003cpin\u003e\",\n\"securityAnswer\" : {\"QuestionID\":\"Answer\"},\n\"username\" : \"\u003cusername\u003e\"\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByUsernameAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndUsernameModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPINByPhoneAndSecurityAnswer-put-\"\u003e Reset PIN By SecurityAnswer And Phone (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using security question answer and phone.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-securityanswer-and-phone/)\n\n \n \n\n ```js\n\nvar resetPINBySecurityQuestionAnswerAndPhoneModel ={ \n\"phone\" : \"\u003cphone\u003e\",\n\"pin\" : \"\u003cpin\u003e\",\n\"securityAnswer\" : {\"QuestionID\":\"Answer\"}\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByPhoneAndSecurityAnswer(resetPINBySecurityQuestionAnswerAndPhoneModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ChangePINByAccessToken-put-\"\u003e Change PIN By Token (PUT)\u003c/h6\u003e\n\n This API is used to change a user's PIN using access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/change-pin-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar changePINModel ={ \n\"newPIN\" : \"\u003cnewPIN\u003e\",\n\"oldPIN\" : \"\u003coldPIN\u003e\"\n};  //Required\n\nlrv2.pinAuthenticationApi.changePINByAccessToken(accessToken, changePINModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPINByPhoneAndOtp-put-\"\u003e Reset PIN by Phone and OTP (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using phoneId and OTP.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-phone-and-otp/)\n\n \n \n\n ```js\n\nvar resetPINByPhoneAndOTPModel ={ \n\"otp\" : \"\u003cotp\u003e\",\n\"phone\" : \"\u003cphone\u003e\",\n\"pin\" : \"\u003cpin\u003e\"\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByPhoneAndOtp(resetPINByPhoneAndOTPModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPINByEmailAndOtp-put-\"\u003e Reset PIN by Email and OTP (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using email and OTP.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-email-and-otp/)\n\n \n \n\n ```js\n\nvar resetPINByEmailAndOtpModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"otp\" : \"\u003cotp\u003e\",\n\"pin\" : \"\u003cpin\u003e\"\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByEmailAndOtp(resetPINByEmailAndOtpModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ResetPINByUsernameAndOtp-put-\"\u003e Reset PIN by Username and OTP (PUT)\u003c/h6\u003e\n\n This API is used to reset pin using username and OTP.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/reset-pin-by-username-and-otp/)\n\n \n \n\n ```js\n\nvar resetPINByUsernameAndOtpModel ={ \n\"otp\" : \"\u003cotp\u003e\",\n\"pin\" : \"\u003cpin\u003e\",\n\"username\" : \"\u003cusername\u003e\"\n};  //Required\n\nlrv2.pinAuthenticationApi.resetPINByUsernameAndOtp(resetPINByUsernameAndOtpModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PINLogin-post-\"\u003e PIN Login (POST)\u003c/h6\u003e\n\n This API is used to login a user by pin and session token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/login-by-pin/)\n\n \n \n\n ```js\n\nvar loginByPINModel ={ \n\"pin\" : \"\u003cpin\u003e\"\n};  //Required\nvar sessionToken = \"\u003csessionToken\u003e\"; //Required\n\nlrv2.pinAuthenticationApi.pinLogin(loginByPINModel, sessionToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SendForgotPINEmailByEmail-post-\"\u003e Forgot PIN By Email (POST)\u003c/h6\u003e\n\n This API sends the reset pin email to specified email address.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-email/)\n\n \n \n\n ```js\n\nvar forgotPINLinkByEmailModel ={ \n\"email\" : \"\u003cemail\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar resetPINUrl = \"\u003cresetPINUrl\u003e\"; //Optional\n\nlrv2.pinAuthenticationApi.sendForgotPINEmailByEmail(forgotPINLinkByEmailModel, emailTemplate, resetPINUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SendForgotPINEmailByUsername-post-\"\u003e Forgot PIN By UserName (POST)\u003c/h6\u003e\n\n This API sends the reset pin email using username.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-username/)\n\n \n \n\n ```js\n\nvar forgotPINLinkByUserNameModel ={ \n\"userName\" : \"\u003cuserName\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar resetPINUrl = \"\u003cresetPINUrl\u003e\"; //Optional\n\nlrv2.pinAuthenticationApi.sendForgotPINEmailByUsername(forgotPINLinkByUserNameModel, emailTemplate, resetPINUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SendForgotPINSMSByPhone-post-\"\u003e Forgot PIN By Phone (POST)\u003c/h6\u003e\n\n This API sends the OTP to specified phone number  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/forgot-pin-by-phone/)\n\n \n \n\n ```js\n\nvar forgotPINOtpByPhoneModel ={ \n\"phone\" : \"\u003cphone\u003e\"\n};  //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.pinAuthenticationApi.sendForgotPINSMSByPhone(forgotPINOtpByPhoneModel, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SetPINByPinAuthToken-post-\"\u003e Set PIN By PinAuthToken (POST)\u003c/h6\u003e\n\n This API is used to change a user's PIN using Pin Auth token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/set-pin-by-pinauthtoken/)\n\n \n \n\n ```js\n\nvar pinRequiredModel ={ \n\"pin\" : \"\u003cpin\u003e\"\n};  //Required\nvar pinAuthToken = \"\u003cpinAuthToken\u003e\"; //Required\n\nlrv2.pinAuthenticationApi.setPINByPinAuthToken(pinRequiredModel, pinAuthToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"InValidatePinSessionToken-get-\"\u003e Invalidate PIN Session Token (GET)\u003c/h6\u003e\n\n This API is used to invalidate pin session token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/pin-authentication/invalidate-pin-session-token/)\n\n \n \n\n ```js\n\nvar sessionToken = \"\u003csessionToken\u003e\"; //Required\n\nlrv2.pinAuthenticationApi.inValidatePinSessionToken(sessionToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### ReAuthentication API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Validate MFA by OTP](#MFAReAuthenticateByOTP-put-)\u003cbr\u003e\n* PUT : [Validate MFA by Backup Code](#MFAReAuthenticateByBackupCode-put-)\u003cbr\u003e\n* PUT : [Validate MFA by Password](#MFAReAuthenticateByPassword-put-)\u003cbr\u003e\n* PUT : [MFA Re-authentication by PIN](#VerifyPINAuthentication-put-)\u003cbr\u003e\n* PUT : [MFA Re-authentication by Email OTP](#ReAuthValidateEmailOtp-put-)\u003cbr\u003e\n* PUT : [MFA Step-Up Authentication by Authenticator Code](#MFAReAuthenticateByAuthenticatorCode-put-)\u003cbr\u003e\n* POST : [Verify Multifactor OTP Authentication](#VerifyMultiFactorOtpReauthentication-post-)\u003cbr\u003e\n* POST : [Verify Multifactor Password Authentication](#VerifyMultiFactorPasswordReauthentication-post-)\u003cbr\u003e\n* POST : [Verify Multifactor PIN Authentication](#VerifyMultiFactorPINReauthentication-post-)\u003cbr\u003e\n* POST : [MFA Re-authentication by Security Question](#ReAuthBySecurityQuestion-post-)\u003cbr\u003e\n* GET : [Multi Factor Re-Authenticate](#MFAReAuthenticate-get-)\u003cbr\u003e\n* GET : [Send MFA Re-auth Email OTP by Access Token](#ReAuthSendEmailOtp-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"MFAReAuthenticateByOTP-put-\"\u003e Validate MFA by OTP (PUT)\u003c/h6\u003e\n\n This API is used to re-authenticate via Multi-factor authentication by passing the One Time Password received via SMS  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-otp/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar reauthByOtpModel ={ \n\"otp\" : \"\u003cotp\u003e\"\n};  //Required\n\nlrv2.reAuthenticationApi.mfaReAuthenticateByOTP(accessToken, reauthByOtpModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAReAuthenticateByBackupCode-put-\"\u003e Validate MFA by Backup Code (PUT)\u003c/h6\u003e\n\n This API is used to re-authenticate by set of backup codes via access token on the site that has Multi-factor authentication enabled in re-authentication for the user that does not have the device  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-backup-code/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar reauthByBackupCodeModel ={ \n\"backupCode\" : \"\u003cbackupCode\u003e\"\n};  //Required\n\nlrv2.reAuthenticationApi.mfaReAuthenticateByBackupCode(accessToken, reauthByBackupCodeModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\n \n  \n  \n \n\u003ch6 id=\"MFAReAuthenticateByPassword-put-\"\u003e Validate MFA by Password (PUT)\u003c/h6\u003e\n\n This API is used to re-authenticate via Multi-factor-authentication by passing the password  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-by-password)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar passwordEventBasedAuthModelWithLockout ={ \n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\n\nlrv2.reAuthenticationApi.mfaReAuthenticateByPassword(accessToken, passwordEventBasedAuthModelWithLockout, smsTemplate2FA).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"VerifyPINAuthentication-put-\"\u003e MFA Re-authentication by PIN (PUT)\u003c/h6\u003e\n\n This API is used to validate the triggered MFA authentication flow with a password.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/pin/re-auth-by-pin/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar pinAuthEventBasedAuthModelWithLockout ={ \n\"pin\" : \"\u003cpin\u003e\"\n};  //Required\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\n\nlrv2.reAuthenticationApi.verifyPINAuthentication(accessToken, pinAuthEventBasedAuthModelWithLockout, smsTemplate2FA).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ReAuthValidateEmailOtp-put-\"\u003e MFA Re-authentication by Email OTP (PUT)\u003c/h6\u003e\n\n This API is used to validate the triggered MFA authentication flow with an Email OTP.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/mfa-re-auth-by-email-otp/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar reauthByEmailOtpModel ={  \n  \"EmailId\":\"email\",\n  \"otp\": \"otp\"\n };  //Required\n\nlrv2.reAuthenticationApi.reAuthValidateEmailOtp(accessToken, reauthByEmailOtpModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\u003ch6 id=\"MFAReAuthenticateByAuthenticatorCode-put-\"\u003e MFA Step-Up Authentication by Authenticator Code (PUT)\u003c/h6\u003e\n\n This API is used to validate the triggered MFA authentication flow with the Authenticator Code.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-by-otp/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar multiFactorAuthModelByAuthenticatorCode ={  \n  \"authenticatorCode\" : \"\u003cauthenticatorCode\u003e\"\n };  //Required\n\nlrv2.reAuthenticationApi.mfaReAuthenticateByAuthenticatorCode(accessToken, multiFactorAuthModelByAuthenticatorCode).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ``` \n  \n \n\u003ch6 id=\"VerifyMultiFactorOtpReauthentication-post-\"\u003e Verify Multifactor OTP Authentication (POST)\u003c/h6\u003e\n\n This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by OTP.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/mfa/re-auth-validate-mfa/)\n\n \n \n\n ```js\n\nvar eventBasedMultiFactorToken ={ \n\"secondFactorValidationToken\" : \"\u003csecondFactorValidationToken\u003e\"\n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.reAuthenticationApi.verifyMultiFactorOtpReauthentication(eventBasedMultiFactorToken, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"VerifyMultiFactorPasswordReauthentication-post-\"\u003e Verify Multifactor Password Authentication (POST)\u003c/h6\u003e\n\n This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by password.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/re-auth-validate-password/)\n\n \n \n\n ```js\n\nvar eventBasedMultiFactorToken ={ \n\"secondFactorValidationToken\" : \"\u003csecondFactorValidationToken\u003e\"\n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.reAuthenticationApi.verifyMultiFactorPasswordReauthentication(eventBasedMultiFactorToken, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"VerifyMultiFactorPINReauthentication-post-\"\u003e Verify Multifactor PIN Authentication (POST)\u003c/h6\u003e\n\n This API is used on the server-side to validate and verify the re-authentication token created by the MFA re-authentication API. This API checks re-authentications created by PIN.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/re-authentication/pin/re-auth-validate-pin/)\n\n \n \n\n ```js\n\nvar eventBasedMultiFactorToken ={ \n\"secondFactorValidationToken\" : \"\u003csecondFactorValidationToken\u003e\"\n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.reAuthenticationApi.verifyMultiFactorPINReauthentication(eventBasedMultiFactorToken, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ReAuthBySecurityQuestion-post-\"\u003e MFA Re-authentication by Security Question (POST)\u003c/h6\u003e\n\n This API is used to validate the triggered MFA re-authentication flow with security questions answers.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/mfa-re-authentication-by-security-question/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar securityQuestionAnswerUpdateModel ={  \n    \"securityquestionanswer\": [\n        {\n            \"QuestionId\": \"db7****8a73e4******bd9****8c20\",\n            \"Answer\": \"\u003canswer\u003e\"\n        }\n    ]\n };  //Required\n\nlrv2.reAuthenticationApi.reAuthBySecurityQuestion(accessToken, securityQuestionAnswerUpdateModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"MFAReAuthenticate-get-\"\u003e Multi Factor Re-Authenticate (GET)\u003c/h6\u003e\n\n This API is used to trigger the Multi-Factor Autentication workflow for the provided access token  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/re-auth-trigger/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar smsTemplate2FA = \"\u003csmsTemplate2FA\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.reAuthenticationApi.mfaReAuthenticate(accessToken, smsTemplate2FA, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ReAuthSendEmailOtp-get-\"\u003e Send MFA Re-auth Email OTP by Access Token (GET)\u003c/h6\u003e\n\n This API is used to send the MFA Email OTP to the email for Re-authentication  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/multi-factor-authentication/re-authentication/send-mfa-re-auth-email-otp-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar emailId = \"\u003cemailId\u003e\"; //Required\nvar emailTemplate2FA = \"\u003cemailTemplate2FA\u003e\"; //Optional\n\nlrv2.reAuthenticationApi.reAuthSendEmailOtp(accessToken, emailId, emailTemplate2FA).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### ConsentManagement API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Update Consent By Access Token](#UpdateConsentProfileByAccessToken-put-)\u003cbr\u003e\n* POST : [Consent By ConsentToken](#SubmitConsentByConsentToken-post-)\u003cbr\u003e\n* POST : [Post Consent By Access Token](#SubmitConsentByAccessToken-post-)\u003cbr\u003e\n* GET : [Get Consent Logs By Uid](#GetConsentLogsByUid-get-)\u003cbr\u003e\n* GET : [Get Consent Log by Access Token](#GetConsentLogs-get-)\u003cbr\u003e\n* GET : [Get Verify Consent By Access Token](#VerifyConsentByAccessToken-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"UpdateConsentProfileByAccessToken-put-\"\u003e Update Consent By Access Token (PUT)\u003c/h6\u003e\n\n This API is to update consents using access token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/update-consent-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar consentUpdateModel ={ \n\"consents\" : [   { \n \"consentOptionId\" : \"\u003cconsentOptionId\u003e\"  ,\n\"isAccepted\" : true  \n}  ] \n};  //Required\n\nlrv2.consentManagementApi.updateConsentProfileByAccessToken(accessToken, consentUpdateModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SubmitConsentByConsentToken-post-\"\u003e Consent By ConsentToken (POST)\u003c/h6\u003e\n\n This API is to submit consent form using consent token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-by-consent-token/)\n\n \n \n\n ```js\n\nvar consentToken = \"\u003cconsentToken\u003e\"; //Required\n\nvar consentSubmitModel ={ \n\"data\" : [   { \n \"consentOptionId\" : \"\u003cconsentOptionId\u003e\"  ,\n\"isAccepted\" : true  \n}  ] ,\n\"events\" : [   { \n \"event\" : \"\u003cevent\u003e\"  ,\n\"isCustom\" : true  \n}  ] \n};  //Required\n\nlrv2.consentManagementApi.submitConsentByConsentToken(consentToken, consentSubmitModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SubmitConsentByAccessToken-post-\"\u003e Post Consent By Access Token (POST)\u003c/h6\u003e\n\n API to provide a way to end user to submit a consent form for particular event type.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nvar consentSubmitModel ={ \n\"data\" : [   { \n \"consentOptionId\" : \"\u003cconsentOptionId\u003e\"  ,\n\"isAccepted\" : true  \n}  ] ,\n\"events\" : [   { \n \"event\" : \"\u003cevent\u003e\"  ,\n\"isCustom\" : true  \n}  ] \n};  //Required\n\nlrv2.consentManagementApi.submitConsentByAccessToken(accessToken, consentSubmitModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetConsentLogsByUid-get-\"\u003e Get Consent Logs By Uid (GET)\u003c/h6\u003e\n\n This API is used to get the Consent logs of the user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-uid/)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.consentManagementApi.getConsentLogsByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetConsentLogs-get-\"\u003e Get Consent Log by Access Token (GET)\u003c/h6\u003e\n\n This API is used to fetch consent logs.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/consent-log-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.consentManagementApi.getConsentLogs(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"VerifyConsentByAccessToken-get-\"\u003e Get Verify Consent By Access Token (GET)\u003c/h6\u003e\n\n This API is used to check if consent is submitted for a particular event or not.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/consent-management/verify-consent-by-access-token/)\n\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\nvar event = \"\u003cevent\u003e\"; //Required\nvar isCustom = true; //Required\n\nlrv2.consentManagementApi.verifyConsentByAccessToken(accessToken, event, isCustom).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### SmartLogin API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* GET : [Smart Login Verify Token](#SmartLoginTokenVerification-get-)\u003cbr\u003e\n* GET : [Smart Login By Email](#SmartLoginByEmail-get-)\u003cbr\u003e\n* GET : [Smart Login By Username](#SmartLoginByUserName-get-)\u003cbr\u003e\n* GET : [Smart Login Ping](#SmartLoginPing-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"SmartLoginTokenVerification-get-\"\u003e Smart Login Verify Token (GET)\u003c/h6\u003e\n\n This API verifies the provided token for Smart Login  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-verify-token/)\n\n \n \n\n ```js\n\nvar verificationToken = \"\u003cverificationToken\u003e\"; //Required\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.smartLoginApi.smartLoginTokenVerification(verificationToken, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SmartLoginByEmail-get-\"\u003e Smart Login By Email (GET)\u003c/h6\u003e\n\n This API sends a Smart Login link to the user's Email Id.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-by-email)\n\n \n \n\n ```js\n\nvar clientGuid = \"\u003cclientGuid\u003e\"; //Required\nvar email = \"\u003cemail\u003e\"; //Required\nvar redirectUrl = \"\u003credirectUrl\u003e\"; //Optional\nvar smartLoginEmailTemplate = \"\u003csmartLoginEmailTemplate\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.smartLoginApi.smartLoginByEmail(clientGuid, email, redirectUrl, smartLoginEmailTemplate, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SmartLoginByUserName-get-\"\u003e Smart Login By Username (GET)\u003c/h6\u003e\n\n This API sends a Smart Login link to the user's Email Id.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-by-username)\n\n \n \n\n ```js\n\nvar clientGuid = \"\u003cclientGuid\u003e\"; //Required\nvar username = \"\u003cusername\u003e\"; //Required\nvar redirectUrl = \"\u003credirectUrl\u003e\"; //Optional\nvar smartLoginEmailTemplate = \"\u003csmartLoginEmailTemplate\u003e\"; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.smartLoginApi.smartLoginByUserName(clientGuid, username, redirectUrl, smartLoginEmailTemplate, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"SmartLoginPing-get-\"\u003e Smart Login Ping (GET)\u003c/h6\u003e\n\n This API is used to check if the Smart Login link has been clicked or not  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/smart-login/smart-login-ping)\n\n \n \n\n ```js\n\nvar clientGuid = \"\u003cclientGuid\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.smartLoginApi.smartLoginPing(clientGuid, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### OneTouchLogin API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [One Touch OTP Verification](#OneTouchLoginOTPVerification-put-)\u003cbr\u003e\n* POST : [One Touch Login by Email](#OneTouchLoginByEmail-post-)\u003cbr\u003e\n* POST : [One Touch Login by Phone](#OneTouchLoginByPhone-post-)\u003cbr\u003e\n* GET : [One Touch Email Verification](#OneTouchEmailVerification-get-)\u003cbr\u003e\n* GET : [One Touch Login Ping](#OneTouchLoginPing-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"OneTouchLoginOTPVerification-put-\"\u003e One Touch OTP Verification (PUT)\u003c/h6\u003e\n\n This API is used to verify the otp for One Touch Login.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-otp-verification/)\n\n \n \n\n ```js\n\nvar otp = \"\u003cotp\u003e\"; //Required\nvar phone = \"\u003cphone\u003e\"; //Required\nvar fields = null; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\n\nlrv2.oneTouchLoginApi.oneTouchLoginOTPVerification(otp, phone, fields, smsTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"OneTouchLoginByEmail-post-\"\u003e One Touch Login by Email (POST)\u003c/h6\u003e\n\n This API is used to send a link to a specified email for a frictionless login/registration  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-login-by-email-captcha/)\n\n \n \n\n ```js\n\nvar oneTouchLoginByEmailModel ={ \n\"clientguid\" : \"\u003cclientguid\u003e\",\n\"email\" : \"\u003cemail\u003e\",\n\"g-recaptcha-response\" : \"\u003cg-recaptcha-response\u003e\"\n};  //Required\nvar oneTouchLoginEmailTemplate = \"\u003coneTouchLoginEmailTemplate\u003e\"; //Optional\nvar redirecturl = \"\u003credirecturl\u003e\"; //Optional\nvar welcomeemailtemplate = \"\u003cwelcomeemailtemplate\u003e\"; //Optional\n\nlrv2.oneTouchLoginApi.oneTouchLoginByEmail(oneTouchLoginByEmailModel, oneTouchLoginEmailTemplate, redirecturl, welcomeemailtemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\n\u003ch6 id=\"OneTouchLoginByPhone-post-\"\u003e One Touch Login by Phone (POST)\u003c/h6\u003e\n\n This API is used to send one time password to a given phone number for a frictionless login/registration.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-login-by-phone-captcha/)\n\n \n \n\n ```js\n\nvar oneTouchLoginByPhoneModel ={ \n\"g-recaptcha-response\" : \"\u003cg-recaptcha-response\u003e\",\n\"phone\" : \"\u003cphone\u003e\"\n};  //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.oneTouchLoginApi.oneTouchLoginByPhone(oneTouchLoginByPhoneModel, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\u003ch6 id=\"OneTouchEmailVerification-get-\"\u003e One Touch Email Verification (GET)\u003c/h6\u003e\n\n This API verifies the provided token for One Touch Login  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-email-verification)\n\n \n \n\n ```js\n\nvar verificationToken = \"\u003cverificationToken\u003e\"; //Required\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.oneTouchLoginApi.oneTouchEmailVerification(verificationToken, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"OneTouchLoginPing-get-\"\u003e One Touch Login Ping (GET)\u003c/h6\u003e\n\n This API is used to check if the One Touch Login link has been clicked or not.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/one-touch-login/one-touch-login-ping/)\n\n \n \n\n ```js\n\nvar clientGuid = \"\u003cclientGuid\u003e\"; //Required\nvar fields = null; //Optional\n\nlrv2.oneTouchLoginApi.oneTouchLoginPing(clientGuid, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### PasswordLessLogin API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Passwordless Login Phone Verification](#PasswordlessLoginPhoneVerification-put-)\u003cbr\u003e\n* POST : [Passwordless Login Verification By Email And OTP](#PasswordlessLoginVerificationByEmailAndOTP-post-)\u003cbr\u003e\n* POST : [Passwordless Login Verification By User Name And OTP](#PasswordlessLoginVerificationByUserNameAndOTP-post-)\u003cbr\u003e\n* GET : [Passwordless Login by Phone](#PasswordlessLoginByPhone-get-)\u003cbr\u003e\n* GET : [Passwordless Login By Email](#PasswordlessLoginByEmail-get-)\u003cbr\u003e\n* GET : [Passwordless Login By UserName](#PasswordlessLoginByUserName-get-)\u003cbr\u003e\n* GET : [Passwordless Login Verification](#PasswordlessLoginVerification-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"PasswordlessLoginPhoneVerification-put-\"\u003e Passwordless Login Phone Verification (PUT)\u003c/h6\u003e\n\n This API verifies an account by OTP and allows the customer to login.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-phone-verification)\n\n \n \n\n ```js\n\nvar passwordLessLoginOtpModel ={ \n\"otp\" : \"\u003cotp\u003e\",\n\"phone\" : \"\u003cphone\u003e\"\n};  //Required\nvar fields = null; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginPhoneVerification(passwordLessLoginOtpModel, fields, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\n \n\u003ch6 id=\"PasswordlessLoginVerificationByEmailAndOTP-post-\"\u003ePasswordless Login Verification By Email And OTP (POST)\u003c/h6\u003e\n\nThis API is used to verify the otp sent to the email when doing a passwordless login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-verify-by-email-and-otp/)\n\n \n \n\n ```js\n\nvar passwordLessLoginByEmailAndOtpModel ={\n\"email\": \"\u003cemail\u003e\",\n\"otp\": \"\u003cotp\u003e\",\n\"welcomeemailtemplate\": \"\u003cwelcome_email_template\u003e\"\n};  //Required\nvar fields = null; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginVerificationByEmailAndOTP(passwordLessLoginByEmailAndOtpModel, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n  \n\u003ch6 id=\"PasswordlessLoginVerificationByUserNameAndOTP-post-\"\u003ePasswordless Login Verification By User Name And OTP (POST)\u003c/h6\u003e\n\nThis API is used to verify the otp sent to the email when doing a passwordless login. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-verify-by-username-and-otp/)\n\n \n \n\n ```js\n\nvar passwordLessLoginByUserNameAndOtpModel ={\n\"username\": \"\u003cUser name\u003e\",\n\"otp\": \"\u003cotp\u003e\",\n\"welcomeemailtemplate\": \"\u003cwelcome_email_template\u003e\"\n};  //Required\nvar fields = null; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginVerificationByUserNameAndOTP(passwordLessLoginByUserNameAndOtpModel, fields).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```   \n  \n \n\u003ch6 id=\"PasswordlessLoginByPhone-get-\"\u003e Passwordless Login by Phone (GET)\u003c/h6\u003e\n\n API can be used to send a One-time Passcode (OTP) provided that the account has a verified PhoneID  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-by-phone)\n\n \n \n\n ```js\n\nvar phone = \"\u003cphone\u003e\"; //Required\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar isVoiceOtp = true; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginByPhone(phone, smsTemplate, isVoiceOtp).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PasswordlessLoginByEmail-get-\"\u003e Passwordless Login By Email (GET)\u003c/h6\u003e\n\n This API is used to send a Passwordless Login verification link to the provided Email ID  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-by-email)\n\n \n \n\n ```js\n\nvar email = \"\u003cemail\u003e\"; //Required\nvar passwordLessLoginTemplate = \"\u003cpasswordLessLoginTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginByEmail(email, passwordLessLoginTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PasswordlessLoginByUserName-get-\"\u003e Passwordless Login By UserName (GET)\u003c/h6\u003e\n\n This API is used to send a Passwordless Login Verification Link to a customer by providing their UserName  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-by-username)\n\n \n \n\n ```js\n\nvar username = \"\u003cusername\u003e\"; //Required\nvar passwordLessLoginTemplate = \"\u003cpasswordLessLoginTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginByUserName(username, passwordLessLoginTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"PasswordlessLoginVerification-get-\"\u003e Passwordless Login Verification (GET)\u003c/h6\u003e\n\n This API is used to verify the Passwordless Login verification link. Note: If you are using Passwordless Login by Phone you will need to use the Passwordless Login Phone Verification API  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/passwordless-login/passwordless-login-verification)\n\n \n \n\n ```js\n\nvar verificationToken = \"\u003cverificationToken\u003e\"; //Required\nvar fields = null; //Optional\nvar welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nlrv2.passwordLessLoginApi.passwordlessLoginVerification(verificationToken, fields, welcomeEmailTemplate).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### Configuration API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* GET : [Get Server Time](#GetServerInfo-get-)\u003cbr\u003e\n* GET : [Get Configurations](#getConfigurations-get-)\u003cbr\u003e\n\n\n\u003ch6 id=\"GetServerInfo-get-\"\u003e Get Server Time (GET)\u003c/h6\u003e\n\n This API allows you to query your LoginRadius account for basic server information and server time information which is useful when generating an SOTT token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/configuration/get-server-time/)\n\n \n \n\n ```js\n\nvar timeDifference = 0; //Optional\n\nlrv2.configurationApi.getServerInfo(timeDifference).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \u003ch6 id=\"getConfigurations-get-\"\u003e Get Configuration (GET)\u003c/h6\u003e\n\n This API is used to get the configurations which are set in the LoginRadius Admin Console for a particular LoginRadius site/environment. [More info](https://www.loginradius.com/docs/api/v2/customer-identity-api/configuration/get-configurations)\n  \n  ```js\n  lrv2.configurationApi.getConfigurations().then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n```\n \n \n\n### Role API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* PUT : [Assign Roles by UID](#AssignRolesByUid-put-)\u003cbr\u003e\n* PUT : [Upsert Context](#UpdateRoleContextByUid-put-)\u003cbr\u003e\n* PUT : [Add Permissions to Role](#AddRolePermissions-put-)\u003cbr\u003e\n* POST : [Roles Create](#CreateRoles-post-)\u003cbr\u003e\n* GET : [Roles by UID](#GetRolesByUid-get-)\u003cbr\u003e\n* GET : [Get Context with Roles and Permissions](#GetRoleContextByUid-get-)\u003cbr\u003e\n* GET : [Role Context profile](#GetRoleContextByContextName-get-)\u003cbr\u003e\n* GET : [Roles List](#GetRolesList-get-)\u003cbr\u003e\n* DELETE : [Unassign Roles by UID](#UnassignRolesByUid-delete-)\u003cbr\u003e\n* DELETE : [Delete Role Context](#DeleteRoleContextByUid-delete-)\u003cbr\u003e\n* DELETE : [Delete Role from Context](#DeleteRolesFromRoleContextByUid-delete-)\u003cbr\u003e\n* DELETE : [Delete Additional Permission from Context](#DeleteAdditionalPermissionFromRoleContextByUid-delete-)\u003cbr\u003e\n* DELETE : [Account Delete Role](#DeleteRole-delete-)\u003cbr\u003e\n* DELETE : [Remove Permissions](#RemoveRolePermissions-delete-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"AssignRolesByUid-put-\"\u003e Assign Roles by UID (PUT)\u003c/h6\u003e\n\n This API is used to assign your desired roles to a given user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/assign-roles-by-uid/)\n\n \n \n\n ```js\n\n\nvar accountRolesModel ={ \n\"roles\" : [  \"roles\" ] \n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.assignRolesByUid(accountRolesModel, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UpdateRoleContextByUid-put-\"\u003e Upsert Context (PUT)\u003c/h6\u003e\n\n This API creates a Context with a set of Roles  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/upsert-context)\n\n \n \n\n ```js\n\nvar accountRoleContextModel ={ \n\"roleContext\" : [   { \n  \"additionalPermissions\" : [\"\u003cadditionalPermissions\u003e\" ] ,\n \"context\" : \"\u003ccontext\u003e\"  ,\n \"expiration\" : \"\u003cexpiration\u003e\"  ,\n  \"roles\" : [\"\u003croles\u003e\" ]  \n}  ] \n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.updateRoleContextByUid(accountRoleContextModel, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"AddRolePermissions-put-\"\u003e Add Permissions to Role (PUT)\u003c/h6\u003e\n\n This API is used to add permissions to a given role.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/add-permissions-to-role)\n\n \n \n\n ```js\n\nvar permissionsModel ={ \n\"permissions\" : [  \"permissions\" ] \n};  //Required\nvar role = \"\u003crole\u003e\"; //Required\n\nlrv2.roleApi.addRolePermissions(permissionsModel, role).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"CreateRoles-post-\"\u003e Roles Create (POST)\u003c/h6\u003e\n\n This API creates a role with permissions.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/roles-create)\n\n \n \n\n ```js\n\nvar rolesModel ={ \n\"roles\" : [   { \n \"name\" : \"\u003cname\u003e\"  ,\n\"permissions\" : {\"Permission_name\":true}  \n}  ] \n};  //Required\n\nlrv2.roleApi.createRoles(rolesModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetRolesByUid-get-\"\u003e Roles by UID (GET)\u003c/h6\u003e\n\n API is used to retrieve all the assigned roles of a particular User.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/get-roles-by-uid)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.getRolesByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetRoleContextByUid-get-\"\u003e Get Context with Roles and Permissions (GET)\u003c/h6\u003e\n\n This API Gets the contexts that have been configured and the associated roles and permissions.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/get-context)\n\n \n \n\n ```js\n\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.getRoleContextByUid(uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetRoleContextByContextName-get-\"\u003e Role Context profile (GET)\u003c/h6\u003e\n\n The API is used to retrieve role context by the context name.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/role-context-profile/)\n\n \n \n\n ```js\n\nvar contextName = \"\u003ccontextName\u003e\"; //Required\n\nlrv2.roleApi.getRoleContextByContextName(contextName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetRolesList-get-\"\u003e Roles List (GET)\u003c/h6\u003e\n\n This API retrieves the complete list of created roles with permissions of your app.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/roles-list)\n\n \n \n\n ```js\n\nlrv2.roleApi.getRolesList().then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"UnassignRolesByUid-delete-\"\u003e Unassign Roles by UID (DELETE)\u003c/h6\u003e\n\n This API is used to unassign roles from a user.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/unassign-roles-by-uid)\n\n \n \n\n ```js\n\nvar accountRolesModel ={ \n\"roles\" : [  \"roles\" ] \n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.unassignRolesByUid(accountRolesModel, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteRoleContextByUid-delete-\"\u003e Delete Role Context (DELETE)\u003c/h6\u003e\n\n This API Deletes the specified Role Context  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-context)\n\n \n \n\n ```js\n\nvar contextName = \"\u003ccontextName\u003e\"; //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.deleteRoleContextByUid(contextName, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteRolesFromRoleContextByUid-delete-\"\u003e Delete Role from Context (DELETE)\u003c/h6\u003e\n\n This API Deletes the specified Role from a Context.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-role-from-context/)\n\n \n \n\n ```js\n\nvar contextName = \"\u003ccontextName\u003e\"; //Required\n\nvar roleContextRemoveRoleModel ={ \n\"roles\" : [  \"roles\" ] \n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.deleteRolesFromRoleContextByUid(contextName, roleContextRemoveRoleModel, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteAdditionalPermissionFromRoleContextByUid-delete-\"\u003e Delete Additional Permission from Context (DELETE)\u003c/h6\u003e\n\n This API Deletes Additional Permissions from Context.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-permissions-from-context)\n\n \n \n\n ```js\n\nvar contextName = \"\u003ccontextName\u003e\"; //Required\n\nvar roleContextAdditionalPermissionRemoveRoleModel ={ \n\"additionalPermissions\" : [  \"additionalPermissions\" ] \n};  //Required\nvar uid = \"\u003cuid\u003e\"; //Required\n\nlrv2.roleApi.deleteAdditionalPermissionFromRoleContextByUid(contextName, roleContextAdditionalPermissionRemoveRoleModel, uid).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteRole-delete-\"\u003e Account Delete Role (DELETE)\u003c/h6\u003e\n\n This API is used to delete the role.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/delete-role)\n\n \n \n\n ```js\n\nvar role = \"\u003crole\u003e\"; //Required\n\nlrv2.roleApi.deleteRole(role).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RemoveRolePermissions-delete-\"\u003e Remove Permissions (DELETE)\u003c/h6\u003e\n\n API is used to remove permissions from a role.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/roles-management/remove-permissions)\n\n \n \n\n ```js\n\nvar permissionsModel ={ \n\"permissions\" : [  \"permissions\" ] \n};  //Required\nvar role = \"\u003crole\u003e\"; //Required\n\nlrv2.roleApi.removeRolePermissions(permissionsModel, role).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n\n### RiskBasedAuthentication API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* POST : [Risk Based Authentication Login by Email](#RBALoginByEmail-post-)\u003cbr\u003e\n* POST : [Risk Based Authentication Login by Username](#RBALoginByUserName-post-)\u003cbr\u003e\n* POST : [Risk Based Authentication Phone Login](#RBALoginByPhone-post-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"RBALoginByEmail-post-\"\u003e Risk Based Authentication Login by Email (POST)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the Email  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-email)\n\n \n \n\n ```js\n\nvar emailAuthenticationModel ={ \n\"email\" : \"\u003cemail\u003e\",\n\"password\" : \"\u003cpassword\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar passwordDelegation = true; //Optional\nvar passwordDelegationApp = \"\u003cpasswordDelegationApp\u003e\"; //Optional\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaBrowserSmsTemplate = \"\u003crbaBrowserSmsTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCitySmsTemplate = \"\u003crbaCitySmsTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaCountrySmsTemplate = \"\u003crbaCountrySmsTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\nvar rbaIpSmsTemplate = \"\u003crbaIpSmsTemplate\u003e\"; //Optional\nvar rbaOneclickEmailTemplate = \"\u003crbaOneclickEmailTemplate\u003e\"; //Optional\nvar rbaOTPSmsTemplate = \"\u003crbaOTPSmsTemplate\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.riskBasedAuthenticationApi.rbaLoginByEmail(emailAuthenticationModel, emailTemplate, fields, loginUrl, passwordDelegation, passwordDelegationApp, rbaBrowserEmailTemplate, rbaBrowserSmsTemplate, rbaCityEmailTemplate, rbaCitySmsTemplate, rbaCountryEmailTemplate, rbaCountrySmsTemplate, rbaIpEmailTemplate, rbaIpSmsTemplate, rbaOneclickEmailTemplate, rbaOTPSmsTemplate, smsTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RBALoginByUserName-post-\"\u003e Risk Based Authentication Login by Username (POST)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the Username  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/authentication/auth-login-by-username)\n\n \n \n\n ```js\n\nvar userNameAuthenticationModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"username\" : \"\u003cusername\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar passwordDelegation = true; //Optional\nvar passwordDelegationApp = \"\u003cpasswordDelegationApp\u003e\"; //Optional\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaBrowserSmsTemplate = \"\u003crbaBrowserSmsTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCitySmsTemplate = \"\u003crbaCitySmsTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaCountrySmsTemplate = \"\u003crbaCountrySmsTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\nvar rbaIpSmsTemplate = \"\u003crbaIpSmsTemplate\u003e\"; //Optional\nvar rbaOneclickEmailTemplate = \"\u003crbaOneclickEmailTemplate\u003e\"; //Optional\nvar rbaOTPSmsTemplate = \"\u003crbaOTPSmsTemplate\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.riskBasedAuthenticationApi.rbaLoginByUserName(userNameAuthenticationModel, emailTemplate, fields, loginUrl, passwordDelegation, passwordDelegationApp, rbaBrowserEmailTemplate, rbaBrowserSmsTemplate, rbaCityEmailTemplate, rbaCitySmsTemplate, rbaCountryEmailTemplate, rbaCountrySmsTemplate, rbaIpEmailTemplate, rbaIpSmsTemplate, rbaOneclickEmailTemplate, rbaOTPSmsTemplate, smsTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"RBALoginByPhone-post-\"\u003e Risk Based Authentication Phone Login (POST)\u003c/h6\u003e\n\n This API retrieves a copy of the user data based on the Phone  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/phone-authentication/phone-login)\n\n \n \n\n ```js\n\nvar phoneAuthenticationModel ={ \n\"password\" : \"\u003cpassword\u003e\",\n\"phone\" : \"\u003cphone\u003e\"\n};  //Required\nvar emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nvar fields = null; //Optional\nvar loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nvar passwordDelegation = true; //Optional\nvar passwordDelegationApp = \"\u003cpasswordDelegationApp\u003e\"; //Optional\nvar rbaBrowserEmailTemplate = \"\u003crbaBrowserEmailTemplate\u003e\"; //Optional\nvar rbaBrowserSmsTemplate = \"\u003crbaBrowserSmsTemplate\u003e\"; //Optional\nvar rbaCityEmailTemplate = \"\u003crbaCityEmailTemplate\u003e\"; //Optional\nvar rbaCitySmsTemplate = \"\u003crbaCitySmsTemplate\u003e\"; //Optional\nvar rbaCountryEmailTemplate = \"\u003crbaCountryEmailTemplate\u003e\"; //Optional\nvar rbaCountrySmsTemplate = \"\u003crbaCountrySmsTemplate\u003e\"; //Optional\nvar rbaIpEmailTemplate = \"\u003crbaIpEmailTemplate\u003e\"; //Optional\nvar rbaIpSmsTemplate = \"\u003crbaIpSmsTemplate\u003e\"; //Optional\nvar rbaOneclickEmailTemplate = \"\u003crbaOneclickEmailTemplate\u003e\"; //Optional\nvar rbaOTPSmsTemplate = \"\u003crbaOTPSmsTemplate\u003e\"; //Optional\nvar smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nvar verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nlrv2.riskBasedAuthenticationApi.rbaLoginByPhone(phoneAuthenticationModel, emailTemplate, fields, loginUrl, passwordDelegation, passwordDelegationApp, rbaBrowserEmailTemplate, rbaBrowserSmsTemplate, rbaCityEmailTemplate, rbaCitySmsTemplate, rbaCountryEmailTemplate, rbaCountrySmsTemplate, rbaIpEmailTemplate, rbaIpSmsTemplate, rbaOneclickEmailTemplate, rbaOTPSmsTemplate, smsTemplate, verificationUrl).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### Sott API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* GET : [Generate SOTT](#GenerateSott-get-)\u003cbr\u003e\n\n\n\n\u003ch6 id=\"GenerateSott-get-\"\u003e Generate SOTT (GET)\u003c/h6\u003e\n\n This API allows you to generate SOTT with a given expiration time.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/session/generate-sott-token)\n\n \n \n\n ```js\n\nvar timeDifference = 0; //Optional\n\n\n\nlrv2.sottApi.generateSott(timeDifference).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### NativeSocial API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* GET : [Get Access Token via Custom JWT Token](#AccessTokenViaCustomJWTToken-get-)\u003cbr\u003e\n* GET : [Access Token via Facebook Token](#GetAccessTokenByFacebookAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token via Twitter Token](#GetAccessTokenByTwitterAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token via Google Token](#GetAccessTokenByGoogleAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token using google JWT token for Native Mobile Login](#GetAccessTokenByGoogleJWTAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token via Linkedin Token](#GetAccessTokenByLinkedinAccessToken-get-)\u003cbr\u003e\n* GET : [Get Access Token By Foursquare Access Token](#GetAccessTokenByFoursquareAccessToken-get-)\u003cbr\u003e\n* GET : [Access Token via Apple Id Code](#GetAccessTokenByAppleIdCode-get-)\u003cbr\u003e\n* GET : [Access Token via WeChat Code](#GetAccessTokenByWeChatCode-get-)\u003cbr\u003e\n* GET : [Access Token via Google AuthCode](#GetAccessTokenByGoogleAuthCode-get-)\u003cbr\u003e\n\n\n\u003ch6 id=\"AccessTokenViaCustomJWTToken-get-\"\u003e Get Access Token via Custom JWT Token (GET)\u003c/h6\u003e\n\n This API is used to retrieve a LoginRadius access token by passing in a valid custom JWT token.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-by-custom-jwt-token/)\n\n \n \n\n ```js\n\nvar idToken = \"\u003cidToken\u003e\"; //Required\nvar providername = \"\u003cprovidername\u003e\"; //Required\n\nlrv2.nativeSocialApi.accessTokenViaCustomJWTToken(idToken, providername).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n\n\u003ch6 id=\"GetAccessTokenByFacebookAccessToken-get-\"\u003e Access Token via Facebook Token (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending Facebook's access token. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-facebook-token/)\n\n \n \n\n ```js\n\nvar fbAccessToken = \"\u003cfbAccessToken\u003e\"; //Required\nvar socialAppName = \"\u003csocialAppName\u003e\"; //Optional\n\nlrv2.nativeSocialApi.getAccessTokenByFacebookAccessToken(fbAccessToken, socialAppName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByTwitterAccessToken-get-\"\u003e Access Token via Twitter Token (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending Twitter's access token. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-twitter-token)\n\n \n \n\n ```js\n\nvar twAccessToken = \"\u003ctwAccessToken\u003e\"; //Required\nvar twTokenSecret = \"\u003ctwTokenSecret\u003e\"; //Required\nvar socialAppName = \"\u003csocialAppName\u003e\"; //Optional\n\nlrv2.nativeSocialApi.getAccessTokenByTwitterAccessToken(twAccessToken, twTokenSecret, socialAppName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByGoogleAccessToken-get-\"\u003e Access Token via Google Token (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending Google's access token. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-token)\n\n \n \n\n ```js\n\nvar googleAccessToken = \"\u003cgoogleAccessToken\u003e\"; //Required\nvar clientId = \"\u003cclientId\u003e\"; //Optional\nvar refreshToken = \"\u003crefreshToken\u003e\"; //Optional\nvar socialAppName = \"\u003csocialAppName\u003e\"; //Optional\n\nlrv2.nativeSocialApi.getAccessTokenByGoogleAccessToken(googleAccessToken, clientId, refreshToken, socialAppName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByGoogleJWTAccessToken-get-\"\u003e Access Token using google JWT token for Native Mobile Login (GET)\u003c/h6\u003e\n\n This API is used to Get LoginRadius Access Token using google jwt id token for google native mobile login/registration.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-googlejwt)\n\n \n \n\n ```js\n\nvar idToken = \"\u003cidToken\u003e\"; //Required\n\nlrv2.nativeSocialApi.getAccessTokenByGoogleJWTAccessToken(idToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByLinkedinAccessToken-get-\"\u003e Access Token via Linkedin Token (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending Linkedin's access token. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-linkedin-token/)\n\n \n \n\n ```js\n\nvar lnAccessToken = \"\u003clnAccessToken\u003e\"; //Required\nvar socialAppName = \"\u003csocialAppName\u003e\"; //Optional\n\nlrv2.nativeSocialApi.getAccessTokenByLinkedinAccessToken(lnAccessToken, socialAppName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByFoursquareAccessToken-get-\"\u003e Get Access Token By Foursquare Access Token (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending Foursquare's access token. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-foursquare-token/)\n\n \n \n\n ```js\n\nvar fsAccessToken = \"\u003cfsAccessToken\u003e\"; //Required\n\nlrv2.nativeSocialApi.getAccessTokenByFoursquareAccessToken(fsAccessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByAppleIdCode-get-\"\u003e Access Token via Apple Id Code (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending a valid Apple ID OAuth Code. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-apple-id-code)\n\n \n \n\n ```js\n\nvar code = \"\u003ccode\u003e\"; //Required\nvar socialAppName = \"\u003csocialAppName\u003e\"; //Optional\n\nlrv2.nativeSocialApi.getAccessTokenByAppleIdCode(code, socialAppName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByWeChatCode-get-\"\u003e Access Token via WeChat Code (GET)\u003c/h6\u003e\n\n This API is used to retrieve a LoginRadius access token by passing in a valid WeChat OAuth Code.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-wechat-code)\n\n \n \n\n ```js\n\nvar code = \"\u003ccode\u003e\"; //Required\n\nlrv2.nativeSocialApi.getAccessTokenByWeChatCode(code).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetAccessTokenByGoogleAuthCode-get-\"\u003e Access Token via Google AuthCode (GET)\u003c/h6\u003e\n\n The API is used to get LoginRadius access token by sending Google's AuthCode. It will be valid for the specific duration of time specified in the response.  [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/native-social-login-api/access-token-via-google-auth-code)\n\n \n \n\n ```js\n\nvar googleAuthcode = \"\u003cgoogleAuthcode\u003e\"; //Required\nvar socialAppName = \"\u003csocialAppName\u003e\"; //Optional\n\nlrv2.nativeSocialApi.getAccessTokenByGoogleAuthCode(googleAuthcode, socialAppName).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n \n\n### WebHook API\n\n\nList of APIs in this Section:\n\n* PUT : [Update Webhook Subscription](#UpdateWebhookSubscription-put-)\n* POST : [Create Webhook Subscription](#CreateWebhookSubscription-post-)\n* GET : [Get Webhook Subscription Detail](#GetWebhookSubscriptionDetail-get-)\n* GET : [List All Webhooks](#ListAllWebhooks-get-)\n* GET : [Get Webhook Events](#GetWebhookEvents-get-)\n* DELETE : [Delete Webhook Subscription](#DeleteWebhookSubscription-delete-)\n\n\n\n\u003ch6 id=\"UpdateWebhookSubscription-put-\"\u003e Update Webhook Subscription (PUT)\u003c/h6\u003e\n\n This API is used to update a webhook subscription  [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/update-webhook-subscription/)\n\n \n \n\n ```js\n\nvar hookId = \"\u003chookId\u003e\"; //Required\n\nvar webHookSubscriptionUpdateModel ={ \n\"Headers\": {\n    \"x-test-header\": \"qa\"\n},\n\"QueryParams\": {\n    \"apikey\": \"859faf40a7c54c209360b45376bf529f\"\n},\n\"Authentication\": {\n    \"AuthType\": \"Basic\",\n    \"BasicAuth\": {\n    \"Username\": \"lrqaadmin\",\n    \"Password\": \"ZBz6JcnZadxc2gB7sf5vby87zBIu6q\"\n    }\n}\n};  //Required\n\nlrv2.webHookApi.updateWebhookSubscription(hookId, webHookSubscriptionUpdateModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"CreateWebhookSubscription-post-\"\u003e Create Webhook Subscription (POST)\u003c/h6\u003e\n\n This API is used to create a new webhook subscription on your LoginRadius site.  [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/create-webhook-subscription/)\n\n \n \n\n ```js\n\n\nvar webHookSubscribeModel ={ \n\"event\" : \"\u003cevent\u003e\",\n\"name\" : \"\u003cname\u003e\",\n\"targetUrl\" : \"\u003ctargetUrl\u003e\",\n\"Headers\": {\n\"Custom-Header\": \"headerValue\"\n},\n\"QueryParams\": {\n    \"apikey\": \"yourApiKey\"\n },\n\"Authentication\": {\n    \"AuthType\": \"Basic\",\n    \"BasicAuth\": {\n    \"Username\": \"yourUsername\",\n    \"Password\": \"yourPassword\"\n    }\n}\n};  //Required\n\nlrv2.webHookApi.createWebhookSubscription(webHookSubscribeModel).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetWebhookSubscriptionDetail-get-\"\u003e Get Webhook Subscription Detail (GET)\u003c/h6\u003e\n\n This API is used to get details of a webhook subscription by Id  [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/get-webhook-subscription-details/)\n\n \n \n\n ```js\n\nvar hookId = \"\u003chookId\u003e\"; //Required\n\nlrv2.webHookApi.getWebhookSubscriptionDetail(hookId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"ListAllWebhooks-get-\"\u003e List All Webhooks (GET)\u003c/h6\u003e\n\n This API is used to get the list of all the webhooks  [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/list-all-webhooks/)\n\n \n \n\n ```js\n\n\nlrv2.webHookApi.listAllWebhooks().then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"GetWebhookEvents-get-\"\u003e Get Webhook Events (GET)\u003c/h6\u003e\n\n This API is used to retrieve all the webhook events.  [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/get-webhook-events/)\n\n \n \n\n ```js\n\n\nlrv2.webHookApi.getWebhookEvents().then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n  \n \n\u003ch6 id=\"DeleteWebhookSubscription-delete-\"\u003e Delete Webhook Subscription (DELETE)\u003c/h6\u003e\n\n This API is used to delete webhook subscription  [More Info](https://www.loginradius.com/docs/api/v2/integrations/webhooks/delete-webhook-subscription/)\n\n \n \n\n ```js\n\nvar hookId = \"\u003chookId\u003e\"; //Required\n\nlrv2.webHookApi.deleteWebhookSubscription(hookId).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n ```\n \n  \n\n### SlidingToken API\n\n\nList of APIs in this Section:\u003cbr\u003e\n\n* GET : [Get Sliding Access Token](#SlidingAccessToken-get-)\u003cbr\u003e\n\n\n\u003ch6 id=\"SlidingAccessToken-get-\"\u003e (GET) Sliding Access Token\u003c/h6\u003e\n\nThis API is used to get access token and refresh token with the expired/nonexpired access token. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/sliding-access-token)\n \n \n\n ```js\n\nvar accessToken = \"\u003caccessToken\u003e\"; //Required\n\nlrv2.slidingTokenApi.slidingAccessToken(accessToken).then((response) =\u003e {\n    console.log(response);\n}).catch((error) =\u003e {\n    console.log(error);\n});\n\n```\n \n\n### Generate SOTT Manually\n\nSOTT is a secure one-time token that can be created using the API key, API secret, and a timestamp ( start time and end time ). You can manually create a SOTT using the following util function.\n\n```js\nvar sottConfig={\n     apiKey: '', //(Optional) LoginRadius Api Key.\n     apiSecret: '', //(Optional) LoginRadius Api Secret (Only Primary Api Secret is used to generate the SOTT manually).\t\n};\n\n//do not pass the time difference if you are passing startTime \u0026 endTime.\n\nvar timeDifference=\"5\"; // (Optional) The time difference will be used to set the expiration time of SOTT, If you do not pass time difference then the default expiration time of SOTT is 10 minutes.\n\n\n// You can pass the start and end time interval and the SOTT will be valid for this time duration. \n\nvar startDate=\"2022-05-17 07:10:42\"; // (Optional) Valid Start Date with Date and time\n\nvar endDate=\"2022-05-17 07:20:42\"; // (Optional) Valid End Date with Date and time\n\n\nlrv2.helper.getSott(sottConfig,startDate, endDate,timeDifference).then(function (sott) {\n       console.log(sott)\n});\n\n```\n\n\n### Demo \u003cbr/\u003e\nWe have a demo web application using the Node SDK, which includes the following features:\n* Traditional email login\n* Multi-Factor login\n* Passwordless login\n* Social login\n* Register\n* Email verification\n* Forgot password\n* Reset password\n* Change password\n* Set password\n* Update account\n* Account linking\n* Custom object management\n* Roles management \u003cbr/\u003e\n\n\nYou can get a copy of our demo project at [Github](http://github.com/LoginRadius/node-js-sdk) .\n\n\n### Demo Configuration\nTerminal/Command Line:\n\n1. Install Node.Js here . Ensure `npm --version` and `node --version` runs properly\n2. Navigate to the demo directory, and run: `npm install`\n3. Set your LoginRadius credentials on the client and server side:\n   * Client side: `demo/demo/assets/js/options.js`\n   * Server side : `demo/server.js`\n   \n   Replace the placeholders with your LoginRadius credentials apikey, apisecret, sitename. These can be obtained from [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret) \n\n4. Navigate to the demo directory, and run: node server.js\n5. Demo will appear on http://localhost:3000","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fnode-js-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floginradius%2Fnode-js-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fnode-js-sdk/lists"}