{"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","funding_links":[],"categories":[],"sub_categories":[],"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/custom","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"}