{"id":18611095,"url":"https://github.com/loginradius/java-sdk","last_synced_at":"2025-04-10T22:33:05.192Z","repository":{"id":39244025,"uuid":"5050031","full_name":"LoginRadius/java-sdk","owner":"LoginRadius","description":"The LoginRadius Java library will let you integrate LoginRadius' customer identity platform with your Java application(s).","archived":false,"fork":false,"pushed_at":"2024-07-09T09:22:18.000Z","size":9109,"stargazers_count":10,"open_issues_count":0,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-07-10T10:53:15.201Z","etag":null,"topics":["customer-registration","hacktoberfest","java-library","java-sdk","library-wrapper","loginradius","loginradius-platform","maven-plugin","social-login","user-registration"],"latest_commit_sha":null,"homepage":"http://www.loginradius.com","language":"Java","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-07-14T18:42:18.000Z","updated_at":"2024-07-09T09:22:20.000Z","dependencies_parsed_at":"2024-07-09T10:38:35.926Z","dependency_job_id":null,"html_url":"https://github.com/LoginRadius/java-sdk","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjava-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjava-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjava-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjava-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoginRadius","download_url":"https://codeload.github.com/LoginRadius/java-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223449814,"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-registration","hacktoberfest","java-library","java-sdk","library-wrapper","loginradius","loginradius-platform","maven-plugin","social-login","user-registration"],"created_at":"2024-11-07T03:12:37.390Z","updated_at":"2024-11-07T03:12:37.944Z","avatar_url":"https://github.com/LoginRadius.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoginRadius Java SDK\nLoginRadius Customer Identity and Access Management SDK for Java\n\n![Home Image](http://docs.lrcontent.com/resources/github/banner-1544x500.png)\n\n\n## Introduction ##\n\nLoginRadius Java 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\n# Installing\n\nLoginRadius is now using Maven. At present the jars *are* available from a public [maven]( http://search.maven.org/#search%7Cga%7C1%7Cloginradius) repository.\n\nUse the following dependency in your project:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.loginradius.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003ejava-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e11.6.0\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\nThe jars are also available [here](http://search.maven.org/#search%7Cga%7C1%7Cloginradius). Select the directory for\nthe latest version and download the jar files.\n\n## Documentation\n\nJava Library\n=====\n\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\n\n\n## Installation\n\nThis documentation presumes you have worked through the client-side implementation to setup your LoginRadius User Registration interfaces that will service the initial registration and login process. Details on this can be found in the [getting started guide.](https://www.loginradius.com/docs/api/v2/getting-started/introduction)\n\nUse the following dependency in your project:\n\nYou can also compile the source by running the following commands. This will generate the javadocs in java-sdk/target/apidocs\n\n\n`$ git clone https://github.com/LoginRadius/java-sdk.git`\u003cbr\u003e\n`$ cd java-sdk`\u003cbr\u003e\n`$ mvn install  `     # Requires maven, download from http://maven.apache.org/download.html\n`$ mvn dependency:copy-dependencies`   # This will generate all dependencies here: java-sdk/target/dependency\nThe jars are also available at [Maven](https://mvnrepository.com/artifact/com.loginradius.sdk/java-sdk).\n\nSelect the directory for the latest version and download the jar files.\n\n## Initialize SDK\nBefore using the SDK, you must initialize the SDK with the help API Key and secret of your LoginRadius site. This information can be found in your LoginRadius account as described [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret/#api-key-and-secret)\n\n```java\nLoginRadiusSDK.Initialize init = new LoginRadiusSDK.Initialize();\ninit.setApiKey(\"\u003cyour-loginradius-api-key\u003e\");\ninit.setApiSecret(\"\u003cyour-loginradius-api-secret\u003e\");\n```\nLoginRadius allows you 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```java\ninit.setOriginIp(\"\u003cClient-Ip-Address\u003e\");\n```\n\n### Custom Domain\nWhen initializing the SDK, optionally specify a custom domain.\n\n```java\ninit.setCustomDomain(\"\u003cCUSTOM-DOMAIN\u003e\");\n```\n\n\n\n### API Request Signing\nWhen initializing the SDK, you can optionally specify enabling this feature. Enabling this feature means the customer does not need to pass an API secret in an API request. Instead, they can pass a dynamically generated hash value. This feature will also make sure that the message is not tampered during transit when someone calls our APIs.\n\n```java\ninit.setRequestSigning(true);\n```\n### Connection Time out\nYou can optionally specify custom connections timeouts \n```java\ninit.setConnectionTimeout(15000); //set connection timeout in millisecond \n```\n### Read Time out\nYou can optionally specify custom Read timeouts \n```java\ninit.setReadTimeout(15000); //set read timeout in millisecond \n```\n\n### Proxy\nWhen making requests to the LoginRadius API, you may also o set the proxy for your web requests so that requests made to api.loginradius.com will be processed by your proxy.\n\n```java\ninit.setProxyHost(\"\");\ninit.setProxyPort(\"\");\ninit.setProxyUserName(\"\");\ninit.setProxyPassword(\"\");\n```\n\n## Quickstart Guide\n\nThe User Registration system relies on two identifiers which you can retrieve as follows:\n\nPass the token returned in the User Registration login response to the code behind. You can use a javascript function in the login and sociallogin onSuccess functions. Additional details on setting up and configuring your interface is available [here](https://www.loginradius.com/docs/api/v2/deployment/js-libraries/getting-started/#user-registration-getting-started). You can set the action in the redirect function to the desired servlet or .jsp.\n\n```java\nfunction redirect(token) {\n    var form = document.createElement(\"form\");\n    form.method = \"POST\";\n    form.action = \"Profile.jsp\";\n     var _token = document.createElement(\"input\");\n    _token.type = \"hidden\";\n    _token.name = \"token\";\n    _token.value = token;\n    form.appendChild(_token);\n    document.body.appendChild(form);\n    form.submit();\n}\n```\n\n### SOTT Configuration \nSott class that uses 256-bit AES encryption which is not supported by Java out of the box,\nBefore calling the class of SOTT you need to install the JCE unlimited strength jars in the security folder.\n\u003cbr\u003e\n* To apply the policy files:\n\n 1. Download the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files from Oracle.\n\u003cbr\u003e\nBe sure to download the correct policy file updates for your version of Java:\n\u003cbr\u003e\nJava 6\nhttp://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html\n\u003cbr\u003e\njava 7\nhttp://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html\n\u003cbr\u003e\njava 8\nhttp://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html\n\u003cbr\u003e\n  2. Uncompress and extract the downloaded file. The download includes a Readme.txt and two .jar files with the same names as the existing policy files.\n\u003cbr\u003e\n  3. Locate the two existing policy files:\n\u003cbr\u003e\nlocal_policy.jar\n\u003cbr\u003e\nUS_export_policy.jar\n\u003cbr\u003e\nOn UNIX, look in \u003cjava-home\u003e/lib/security/\n\u003cbr\u003e\nOn Windows, look in C:/Program Files/Java/jre\u003cversion\u003e/lib/security/\n\u003cbr\u003e\n  4. Replace the existing policy files with the unlimited strength policy files you extracted.\n\n\n* After complete the configuration, use below code to get the SOTT.\n\n* By default, the SOTT expiration time will be 10 minutes if you use the below code.\n\n```java\nSott sott = new Sott();\nString sottResponse = sott.getSott(null);\n```\n* If you want to validate your SOTT for long term then pass required timedifference in minutes.\n* We recommend to set `getLrServerTime=true`for generating manual SOTT for a long term because it uses the server time not your system local time.\n\n```java\nServiceSottInfo serviceSottInfo=new ServiceSottInfo();\n\t\t\t\t\t\t\t\t\t\t\nserviceSottInfo.setTimeDifference(\"\");  // (Optional) The time difference will be used to set the expiration time of SOTT, If you do not pass time difference then the default expiration time of SOTT is 10 minutes.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nServiceInfoModel service=new ServiceInfoModel();\t\t\t\t\nservice.setSott(serviceSottInfo);\n\t\t\n\t\t\n//The LoginRadius API key and primary API secret can be passed additionally, If the credentials will not be passed then this SOTT function will pick the API credentials from the SDK configuration. \t\t\t\t\nString apiKey=\"\";//(Optional) LoginRadius Api Key.\nString apiSecret=\"\";//(Optional) LoginRadius Api Secret (Only Primary Api Secret is used to generate the SOTT manually).\n\t\t\n\t\t\nboolean getLrServerTime=true;//(Optional) If true it will call LoginRadius Get Server Time Api and fetch basic server information and server time information which is useful when generating an SOTT token.\n\n\ntry {\n\tString sottResponse = Sott.getSott(service,apiKey,apiSecret,getLrServerTime);\n\tSystem.out.println(\"sott = \" + sottResponse);     \n\t          \n} catch (Exception e) {\n\te.printStackTrace();\n\t\t\t\t  \n}\n```\n\n\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\n\u003ch6 id=\"UpdateProfileByAccessToken-put-\"\u003eAuth Update Profile by Token (PUT)\u003c/h6\u003e\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```Java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nUserProfileUpdateModel userProfileUpdateModel = new UserProfileUpdateModel(); //Required\nuserProfileUpdateModel.setFirstName(\"firstName\"); \nuserProfileUpdateModel.setLastName(\"lastName\"); \nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString fields = null; //Optional\n\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\nString options = \"\u003coptions\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.updateProfileByAccessToken(accessToken,  userProfileUpdateModel, emailTemplate, fields, smsTemplate, verificationUrl, isVoiceOtp , options ,  new AsyncHandler\u003cUserProfilePostResponse\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cIdentity\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UnlockAccountByToken-put-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nUnlockProfileModel unlockProfileModel = new UnlockProfileModel(); //Required\nunlockProfileModel.setG_Recaptcha_Response(\"g-recaptcha-response\"); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.unlockAccountByToken(accessToken,  unlockProfileModel ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"VerifyEmailByOTP-put-\"\u003eAuth 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```java\n\nEmailVerificationByOtpModel emailVerificationByOtpModel = new EmailVerificationByOtpModel(); //Required\nemailVerificationByOtpModel.setEmail(\"email\"); \nemailVerificationByOtpModel.setOtp(\"otp\"); \nString fields = null; //Optional\nString url = \"\u003curl\u003e\"; //Optional\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.verifyEmailByOTP( emailVerificationByOtpModel, fields, url, welcomeEmailTemplate ,  new AsyncHandler\u003cUserProfilePostResponse\u003cEmailVerificationData\u003cIdentity\u003e\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cEmailVerificationData\u003cIdentity\u003e\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ResetPasswordBySecurityAnswerAndEmail-put-\"\u003eAuth 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```java\n\nResetPasswordBySecurityAnswerAndEmailModel resetPasswordBySecurityAnswerAndEmailModel = new ResetPasswordBySecurityAnswerAndEmailModel(); //Required\nresetPasswordBySecurityAnswerAndEmailModel.setEmail(\"email\"); \nresetPasswordBySecurityAnswerAndEmailModel.setPassword(\"password\"); \nMap\u003cString,String\u003e securityAnswer= new HashMap\u003cString,String\u003e ();\nsecurityAnswer.put(\"\u003csecurity-qustion-id\u003e\", \"\u003csecurity-answer\u003e\" );\nresetPasswordBySecurityAnswerAndEmailModel.setSecurityAnswer(securityAnswer); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.resetPasswordBySecurityAnswerAndEmail( resetPasswordBySecurityAnswerAndEmailModel ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessTokenBase\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessTokenBase\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ResetPasswordBySecurityAnswerAndPhone-put-\"\u003eAuth 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```java\n\nResetPasswordBySecurityAnswerAndPhoneModel resetPasswordBySecurityAnswerAndPhoneModel = new ResetPasswordBySecurityAnswerAndPhoneModel(); //Required\nresetPasswordBySecurityAnswerAndPhoneModel.setPassword(\"password\"); \nresetPasswordBySecurityAnswerAndPhoneModel.setPhone(\"phone\"); \nMap\u003cString,String\u003e securityAnswer= new HashMap\u003cString,String\u003e ();\nsecurityAnswer.put(\"\u003csecurity-qustion-id\u003e\", \"\u003csecurity-answer\u003e\" );\nresetPasswordBySecurityAnswerAndPhoneModel.setSecurityAnswer(securityAnswer); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.resetPasswordBySecurityAnswerAndPhone( resetPasswordBySecurityAnswerAndPhoneModel ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessTokenBase\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessTokenBase\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ResetPasswordBySecurityAnswerAndUserName-put-\"\u003eAuth 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```java\n\nResetPasswordBySecurityAnswerAndUserNameModel resetPasswordBySecurityAnswerAndUserNameModel = new ResetPasswordBySecurityAnswerAndUserNameModel(); //Required\nresetPasswordBySecurityAnswerAndUserNameModel.setPassword(\"password\"); \nMap\u003cString,String\u003e securityAnswer= new HashMap\u003cString,String\u003e ();\nsecurityAnswer.put(\"\u003csecurity-qustion-id\u003e\", \"\u003csecurity-answer\u003e\" );\nresetPasswordBySecurityAnswerAndUserNameModel.setSecurityAnswer(securityAnswer); \nresetPasswordBySecurityAnswerAndUserNameModel.setUserName(\"userName\"); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.resetPasswordBySecurityAnswerAndUserName( resetPasswordBySecurityAnswerAndUserNameModel ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessTokenBase\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessTokenBase\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\u003ch6 id=\"ResetPasswordByResetToken-put-\"\u003eAuth 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```java\n\nResetPasswordByResetTokenModel resetPasswordByResetTokenModel = new ResetPasswordByResetTokenModel(); //Required\nresetPasswordByResetTokenModel.setPassword(\"password\"); \nresetPasswordByResetTokenModel.setResetToken(\"resetToken\"); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.resetPasswordByResetToken( resetPasswordByResetTokenModel ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessTokenBase\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessTokenBase\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ResetPasswordByEmailOTP-put-\"\u003eAuth 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```java\n\nResetPasswordByEmailAndOtpModel resetPasswordByEmailAndOtpModel = new ResetPasswordByEmailAndOtpModel(); //Required\nresetPasswordByEmailAndOtpModel.setEmail(\"email\"); \nresetPasswordByEmailAndOtpModel.setOtp(\"otp\"); \nresetPasswordByEmailAndOtpModel.setPassword(\"password\"); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.resetPasswordByEmailOTP( resetPasswordByEmailAndOtpModel ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessTokenBase\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessTokenBase\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ResetPasswordByOTPAndUserName-put-\"\u003eAuth 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```java\n\nResetPasswordByUserNameModel resetPasswordByUserNameModel = new ResetPasswordByUserNameModel(); //Required\nresetPasswordByUserNameModel.setOtp(\"otp\"); \nresetPasswordByUserNameModel.setPassword(\"password\"); \nresetPasswordByUserNameModel.setUserName(\"userName\"); \n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.resetPasswordByOTPAndUserName( resetPasswordByUserNameModel ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessTokenBase\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessTokenBase\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ChangePassword-put-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString newPassword = \"\u003cnewPassword\u003e\"; //Required\nString oldPassword = \"\u003coldPassword\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.changePassword(accessToken, newPassword, oldPassword ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"SetOrChangeUserName-put-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString username = \"\u003cusername\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.setOrChangeUserName(accessToken, username ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"AuthResendEmailVerification-put-\"\u003eAuth 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.authResendEmailVerification(email, emailTemplate, verificationUrl ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"AddEmail-post-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString email = \"\u003cemail\u003e\"; //Required\nString type = \"\u003ctype\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.addEmail(accessToken, email, type, emailTemplate, verificationUrl ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"LoginByEmail-post-\"\u003eAuth 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```java\n\nEmailAuthenticationModel emailAuthenticationModel = new EmailAuthenticationModel(); //Required\nemailAuthenticationModel.setEmail(\"email\"); \nemailAuthenticationModel.setPassword(\"password\"); \nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString fields = null; //Optional\nString loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.loginByEmail( emailAuthenticationModel, emailTemplate, fields, loginUrl, verificationUrl ,  new AsyncHandler\u003cAccessToken\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessToken\u003cIdentity\u003e response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"LoginByUserName-post-\"\u003eAuth 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```java\n\nUserNameAuthenticationModel userNameAuthenticationModel = new UserNameAuthenticationModel(); //Required\nuserNameAuthenticationModel.setPassword(\"password\"); \nuserNameAuthenticationModel.setUsername(\"username\"); \nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString fields = null; //Optional\nString loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.loginByUserName( userNameAuthenticationModel, emailTemplate, fields, loginUrl, verificationUrl ,  new AsyncHandler\u003cAccessToken\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessToken\u003cIdentity\u003e response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ForgotPassword-post-\"\u003eAuth 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\nString resetPasswordUrl = \"\u003cresetPasswordUrl\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.forgotPassword(email, resetPasswordUrl, emailTemplate ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"LinkSocialIdentities-post-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString candidateToken = \"\u003ccandidateToken\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.linkSocialIdentities(accessToken, candidateToken ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"LinkSocialIdentitiesByPing-post-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString clientGuid = \"\u003cclientGuid\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.linkSocialIdentitiesByPing(accessToken, clientGuid ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UserRegistrationByEmail-post-\"\u003eAuth 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```Java\n\nAuthUserRegistrationModel authUserRegistrationModel = new AuthUserRegistrationModel(); //Required\nList\u003cEmailModel\u003e email = new ArrayList \u003c EmailModel \u003e();\nEmailModel emailModel = new EmailModel(); \nemailModel.setType(\"type\");\nemailModel.setValue(\"value\");\nemail.add(emailModel);\nauthUserRegistrationModel.setEmail(email); \nauthUserRegistrationModel.setFirstName(\"firstName\"); \nauthUserRegistrationModel.setLastName(\"lastName\"); \nauthUserRegistrationModel.setPassword(\"password\"); \nString sott = \"\u003csott\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString fields = null; //Optional\nString options = \"\u003coptions\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.userRegistrationByEmail( authUserRegistrationModel, sott, emailTemplate, fields, options, verificationUrl, welcomeEmailTemplate, isVoiceOtp ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessToken\u003cIdentity\u003e\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessToken\u003cIdentity\u003e\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UserRegistrationByCaptcha-post-\"\u003eAuth 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```Java\n\nAuthUserRegistrationModelWithCaptcha authUserRegistrationModelWithCaptcha = new AuthUserRegistrationModelWithCaptcha(); //Required\nList\u003cEmailModel\u003e email = new ArrayList \u003c EmailModel \u003e();\nEmailModel emailModel = new EmailModel(); \nemailModel.setType(\"type\");\nemailModel.setValue(\"value\");\nemail.add(emailModel);\nauthUserRegistrationModelWithCaptcha.setEmail(email); \nauthUserRegistrationModelWithCaptcha.setFirstName(\"firstName\"); \nauthUserRegistrationModelWithCaptcha.setG_Recaptcha_Response(\"g-recaptcha-response\"); \nauthUserRegistrationModelWithCaptcha.setLastName(\"lastName\"); \nauthUserRegistrationModelWithCaptcha.setPassword(\"password\"); \nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString fields = null; //Optional\nString options = \"\u003coptions\u003e\"; //Optional\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.userRegistrationByCaptcha( authUserRegistrationModelWithCaptcha, emailTemplate, fields, options, smsTemplate, verificationUrl, welcomeEmailTemplate, isVoiceOtp ,  new AsyncHandler\u003cUserProfilePostResponse\u003cAccessToken\u003cIdentity\u003e\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cAccessToken\u003cIdentity\u003e\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetSecurityQuestionsByEmail-get-\"\u003eGet 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getSecurityQuestionsByEmail(email ,  new AsyncHandler\u003cSecurityQuestions[]\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(SecurityQuestions[] response) {\n  System.out.println(response[0].getQuestion());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetSecurityQuestionsByUserName-get-\"\u003eGet 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```java\n\nString userName = \"\u003cuserName\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getSecurityQuestionsByUserName(userName ,  new AsyncHandler\u003cSecurityQuestions[]\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(SecurityQuestions[] response) {\n  System.out.println(response[0].getQuestion());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetSecurityQuestionsByPhone-get-\"\u003eGet 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```java\n\nString phone = \"\u003cphone\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getSecurityQuestionsByPhone(phone ,  new AsyncHandler\u003cSecurityQuestions[]\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(SecurityQuestions[] response) {\n  System.out.println(response[0].getQuestion());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetSecurityQuestionsByAccessToken-get-\"\u003eGet 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getSecurityQuestionsByAccessToken(accessToken ,  new AsyncHandler\u003cSecurityQuestions[]\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(SecurityQuestions[] response) {\n  System.out.println(response[0].getQuestion());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"AuthValidateAccessToken-get-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.authValidateAccessToken(accessToken ,  new AsyncHandler\u003cAccessTokenBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessTokenBase response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"AuthInValidateAccessToken-get-\"\u003eAccess 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nBoolean preventRefresh = true; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.authInValidateAccessToken(accessToken, preventRefresh ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccessTokenInfo-get-\"\u003eAccess 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getAccessTokenInfo(accessToken ,  new AsyncHandler\u003cTokenInfoResponseModel\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(TokenInfoResponseModel response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetProfileByAccessToken-get-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString fields = null; //Optional\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getProfileByAccessToken(accessToken, fields, emailTemplate, verificationUrl, welcomeEmailTemplate ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"SendWelcomeEmail-get-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.sendWelcomeEmail(accessToken, welcomeEmailTemplate ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"DeleteAccountByDeleteToken-get-\"\u003eAuth 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```java\n\nString deletetoken = \"\u003cdeletetoken\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.deleteAccountByDeleteToken(deletetoken ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\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```java\n\nString clientGuid = \"\u003cclientGuid\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString fields = null; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getProfileByPing(clientGuid, emailTemplate, fields, verificationUrl, welcomeEmailTemplate ,  new AsyncHandler\u003cAccessToken\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessToken\u003cIdentity\u003e response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```  \n\n\n\n\n\u003ch6 id=\"CheckEmailAvailability-get-\"\u003eAuth 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.checkEmailAvailability(email ,  new AsyncHandler\u003cExistResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(ExistResponse response) {\n  System.out.println(response.getIsExist());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"VerifyEmail-get-\"\u003eAuth 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```Java\n\nString verificationToken = \"\u003cverificationToken\u003e\"; //Required\nString fields = null; //Optional\nString url = \"\u003curl\u003e\"; //Optional\nString welcomeEmailTemplate = \"\u003cwelcomeEmailTemplate\u003e\"; //Optional\nString uuid = \"\u003cuuid\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.verifyEmail(verificationToken, fields, url, welcomeEmailTemplate , uuid,  new AsyncHandler\u003cUserProfilePostResponse\u003cEmailVerificationData\u003cIdentity\u003e\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cEmailVerificationData\u003cIdentity\u003e\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"CheckUserNameAvailability-get-\"\u003eAuth 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```java\n\nString username = \"\u003cusername\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.checkUserNameAvailability(username ,  new AsyncHandler\u003cExistResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(ExistResponse response) {\n  System.out.println(response.getIsExist());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"AcceptPrivacyPolicy-get-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString fields = null; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.acceptPrivacyPolicy(accessToken, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetPrivacyPolicyHistoryByAccessToken-get-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.getPrivacyPolicyHistoryByAccessToken(accessToken ,  new AsyncHandler\u003cPrivacyPolicyHistoryResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PrivacyPolicyHistoryResponse response) {\n  System.out.println(response.getCurrent());\n }\n});\n\n```\n\n  \n\u003ch6 id=\"AuthSendVerificationEmailForLinkingSocialProfiles-get-\"\u003eAuth 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```Java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString clientguid = \"\u003cclientguid\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.authSendVerificationEmailForLinkingSocialProfiles(accessToken, clientguid ,  new AsyncHandler\u003cPostResponseResendEmailVerification\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponseResendEmailVerification response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n\n\n\u003ch6 id=\"DeleteAccountWithEmailConfirmation-delete-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString deleteUrl = \"\u003cdeleteUrl\u003e\"; //Optional\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.deleteAccountWithEmailConfirmation(accessToken, deleteUrl, emailTemplate ,  new AsyncHandler\u003cDeleteRequestAcceptResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteRequestAcceptResponse response) {\n  System.out.println(response.getIsDeleteRequestAccepted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"RemoveEmail-delete-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString email = \"\u003cemail\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.removeEmail(accessToken, email ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UnlinkSocialIdentities-delete-\"\u003eAuth 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString provider = \"\u003cprovider\u003e\"; //Required\nString providerId = \"\u003cproviderId\u003e\"; //Required\n\nAuthenticationApi authenticationApi = new AuthenticationApi();\nauthenticationApi.unlinkSocialIdentities(accessToken, provider, providerId ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\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\n\u003ch6 id=\"UpdateAccountByUid-put-\"\u003eAccount 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```java\n\nAccountUserProfileUpdateModel accountUserProfileUpdateModel = new AccountUserProfileUpdateModel(); //Required\naccountUserProfileUpdateModel.setFirstName(\"firstName\"); \naccountUserProfileUpdateModel.setLastName(\"lastName\"); \nString uid = \"\u003cuid\u003e\"; //Required\nString fields = null; //Optional\n\n\nAccountApi accountApi = new AccountApi();\naccountApi.updateAccountByUid( accountUserProfileUpdateModel, uid, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UpdatePhoneIDByUid-put-\"\u003eUpdate 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```java\n\nString phone = \"\u003cphone\u003e\"; //Required\nString uid = \"\u003cuid\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.updatePhoneIDByUid(phone, uid, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"SetAccountPasswordByUid-put-\"\u003eAccount 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```java\n\nString password = \"\u003cpassword\u003e\"; //Required\nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.setAccountPasswordByUid(password, uid ,  new AsyncHandler\u003cUserPasswordHash\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserPasswordHash response) {\n  System.out.println(response.getPasswordHash());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"InvalidateAccountEmailVerification-put-\"\u003eAccount 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```java\n\nString uid = \"\u003cuid\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString verificationUrl = \"\u003cverificationUrl\u003e\"; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.invalidateAccountEmailVerification(uid, emailTemplate, verificationUrl ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ResetPhoneIDVerificationByUid-put-\"\u003eReset 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```Java\n\nString uid = \"\u003cuid\u003e\"; //Required\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.resetPhoneIDVerificationByUid(uid, smsTemplate, isVoiceOtp ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UpsertEmail-put-\"\u003eUpsert 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```java\n\nUpsertEmailModel upsertEmailModel = new UpsertEmailModel(); //Required\nList\u003cEmailModel\u003e email = new ArrayList \u003c EmailModel \u003e();\nEmailModel emailModel = new EmailModel(); \nemailModel.setType(\"type\");\nemailModel.setValue(\"value\");\nemail.add(emailModel);\nupsertEmailModel.setEmail(email); \nString uid = \"\u003cuid\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.upsertEmail( upsertEmailModel, uid, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"AccountUpdateUid-put-\"\u003eUpdate 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```java\n\nUpdateUidModel updateUidModel = new UpdateUidModel(); //Required\nupdateUidModel.setNewUid(\"newUid\"); \nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.accountUpdateUid( updateUidModel, uid ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"CreateAccount-post-\"\u003eAccount 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```java\n\nAccountCreateModel accountCreateModel = new AccountCreateModel(); //Required\nList\u003cEmailModel\u003e email = new ArrayList \u003c EmailModel \u003e();\nEmailModel emailModel = new EmailModel(); \nemailModel.setType(\"type\");\nemailModel.setValue(\"value\");\nemail.add(emailModel);\naccountCreateModel.setEmail(email); \naccountCreateModel.setFirstName(\"firstName\"); \naccountCreateModel.setLastName(\"lastName\"); \naccountCreateModel.setPassword(\"password\"); \nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.createAccount( accountCreateModel, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetForgotPasswordToken-post-\"\u003eForgot 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\nString emailTemplate = \"\u003cemailTemplate\u003e\"; //Optional\nString resetPasswordUrl = \"\u003cresetPasswordUrl\u003e\"; //Optional\nBoolean sendEmail = true; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.getForgotPasswordToken(email, emailTemplate, resetPasswordUrl, sendEmail ,  new AsyncHandler\u003cForgotPasswordResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(ForgotPasswordResponse response) {\n  System.out.println(response.getForgotToken());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetEmailVerificationToken-post-\"\u003eEmail 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.getEmailVerificationToken(email ,  new AsyncHandler\u003cEmailVerificationTokenResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(EmailVerificationTokenResponse response) {\n  System.out.println(response.getVerificationToken());\n }\n});\n\n```\n\n\n\u003ch6 id=\"MultipurposeEmailTokenGeneration-post-\"\u003eMultipurpose 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```Java\n\nMultiEmailToken multiEmailToken = new MultiEmailToken(); //Required\nmultiEmailToken.setClientguid(\"clientguid\"); \nmultiEmailToken.setEmail(\"email\"); \nmultiEmailToken.setName(\"name\"); \nmultiEmailToken.setType(\"type\"); \nmultiEmailToken.setUid(\"uid\"); \nmultiEmailToken.setUserName(\"userName\"); \nString tokentype = \"\u003ctokentype\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.multipurposeEmailTokenGeneration( multiEmailToken, tokentype ,  new AsyncHandler\u003cMultiToken\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(MultiToken response) {\n  System.out.println(response.getExpiresIn());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"MultipurposeSMSOTPGeneration-post-\"\u003eMultipurpose 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```Java\n\nMultiSmsOtp multiSmsOtp = new MultiSmsOtp(); //Required\nmultiSmsOtp.setName(\"name\"); \nmultiSmsOtp.setPhone(\"phone\"); \nmultiSmsOtp.setUid(\"uid\"); \nString smsotptype = \"\u003csmsotptype\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.multipurposeSMSOTPGeneration( multiSmsOtp, smsotptype ,  new AsyncHandler\u003cMultiToken\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(MultiToken response) {\n  System.out.println(response.getExpiresIn());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetPrivacyPolicyHistoryByUid-get-\"\u003eGet 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```java\n\nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.getPrivacyPolicyHistoryByUid(uid ,  new AsyncHandler\u003cPrivacyPolicyHistoryResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PrivacyPolicyHistoryResponse response) {\n  System.out.println(response.getCurrent());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccountProfileByEmail-get-\"\u003eAccount 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccountProfileByEmail(email, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccountProfileByUserName-get-\"\u003eAccount 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```java\n\nString userName = \"\u003cuserName\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccountProfileByUserName(userName, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccountProfileByPhone-get-\"\u003eAccount 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```java\n\nString phone = \"\u003cphone\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccountProfileByPhone(phone, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccountProfileByUid-get-\"\u003eAccount 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```java\n\nString uid = \"\u003cuid\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccountProfileByUid(uid, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccountPasswordHashByUid-get-\"\u003eAccount 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```java\n\nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccountPasswordHashByUid(uid ,  new AsyncHandler\u003cUserPasswordHash\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserPasswordHash response) {\n  System.out.println(response.getPasswordHash());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccessTokenByUid-get-\"\u003eAccess 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```java\n\nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccessTokenByUid(uid ,  new AsyncHandler\u003cAccessTokenBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessTokenBase response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"RefreshAccessTokenByRefreshToken-get-\"\u003eRefresh 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```java\n\nString refreshToken = \"\u003crefreshToken\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.refreshAccessTokenByRefreshToken(refreshToken ,  new AsyncHandler\u003cAccessTokenBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessTokenBase response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"RevokeRefreshToken-get-\"\u003eRevoke 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```java\n\nString refreshToken = \"\u003crefreshToken\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.revokeRefreshToken(refreshToken ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetAccountIdentitiesByEmail-get-\"\u003eAccount 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.getAccountIdentitiesByEmail(email, fields ,  new AsyncHandler\u003cListReturn\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(ListReturn\u003cIdentity\u003e response) {\n  System.out.println(response.getData().get(0).getUid());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"DeleteAccountByUid-delete-\"\u003eAccount 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```java\n\nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.deleteAccountByUid(uid ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"RemoveEmail-delete-\"\u003eAccount 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\nString uid = \"\u003cuid\u003e\"; //Required\nString fields = null; //Optional\n\nAccountApi accountApi = new AccountApi();\naccountApi.removeEmail(email, uid, fields ,  new AsyncHandler\u003cIdentity\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(Identity response) {\n  System.out.println(response.getUid());\n }\n});\n\n```\n\n\u003ch6 id=\"RevokeAllRefreshToken-delete-\"\u003eRevoke 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```Java\n\nString uid = \"\u003cuid\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.revokeAllRefreshToken(uid ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\n\n\n\n\n\u003ch6 id=\"AccountDeleteByEmail-delete-\"\u003eDelete 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```java\n\nString email = \"\u003cemail\u003e\"; //Required\n\nAccountApi accountApi = new AccountApi();\naccountApi.accountDeleteByEmail(email ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\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-\"\u003eAccess 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```java\n\nString token = \"\u003ctoken\u003e\"; //Required\n\nSocialApi socialApi = new SocialApi();\nsocialApi.exchangeAccessToken(token ,  new AsyncHandler\u003cAccessTokenBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessTokenBase response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"RefreshAccessToken-get-\"\u003eRefresh 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nInteger expiresIn = 0; //Optional\nBoolean isWeb = true; //Optional\n\nSocialApi socialApi = new SocialApi();\nsocialApi.refreshAccessToken(accessToken, expiresIn, isWeb ,  new AsyncHandler\u003cAccessTokenBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessTokenBase response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ValidateAccessToken-get-\"\u003eToken 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\n\nSocialApi socialApi = new SocialApi();\nsocialApi.validateAccessToken(accessToken ,  new AsyncHandler\u003cAccessTokenBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessTokenBase response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"InValidateAccessToken-get-\"\u003eAccess 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\n\nSocialApi socialApi = new SocialApi();\nsocialApi.inValidateAccessToken(accessToken ,  new AsyncHandler\u003cPostMethodResponseBase\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostMethodResponseBase response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetActiveSession-get-\"\u003eGet 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```java\n\nString token = \"\u003ctoken\u003e\"; //Required\n\nSocialApi socialApi = new SocialApi();\nsocialApi.getActiveSession(token ,  new AsyncHandler\u003cUserActiveSession\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserActiveSession response) {\n  System.out.println(response.getData().get(0).getAccessToken());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetActiveSessionByAccountID-get-\"\u003eGet 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```java\n\nString accountId = \"\u003caccountId\u003e\"; //Required\n\nSocialApi socialApi = new SocialApi();\nsocialApi.getActiveSessionByAccountID(accountId ,  new AsyncHandler\u003cUserActiveSession\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserActiveSession response) {\n  System.out.println(response.getData().get(0).getAccessToken());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetActiveSessionByProfileID-get-\"\u003eGet 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```java\n\nString profileId = \"\u003cprofileId\u003e\"; //Required\n\nSocialApi socialApi = new SocialApi();\nsocialApi.getActiveSessionByProfileID(profileId ,  new AsyncHandler\u003cUserActiveSession\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserActiveSession response) {\n  System.out.println(response.getData().get(0).getAccessToken());\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\n\u003ch6 id=\"UpdateCustomObjectByToken-put-\"\u003eCustom 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\nJsonObject json = new JsonObject(); //Required\njson.addProperty(\"field1\", \"Store my field1 value\");\nCustomObjectUpdateOperationType updateType = CustomObjectUpdateOperationType.PartialReplace; //Optional\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.updateCustomObjectByToken(accessToken, objectName, objectRecordId,  json, updateType ,  new AsyncHandler\u003cUserCustomObjectData\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserCustomObjectData response) {\n  System.out.println(response.getCustomObject());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UpdateCustomObjectByUid-put-\"\u003eCustom 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```java\n\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\nJsonObject json = new JsonObject(); //Required\njson.addProperty(\"field1\", \"Store my field1 value\");\nString uid = \"\u003cuid\u003e\"; //Required\nCustomObjectUpdateOperationType updateType = CustomObjectUpdateOperationType.PartialReplace; //Optional\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.updateCustomObjectByUid(objectName, objectRecordId,  json, uid, updateType ,  new AsyncHandler\u003cUserCustomObjectData\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserCustomObjectData response) {\n  System.out.println(response.getCustomObject());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"CreateCustomObjectByToken-post-\"\u003eCreate 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString objectName = \"\u003cobjectName\u003e\"; //Required\nJsonObject json = new JsonObject(); //Required\njson.addProperty(\"field1\", \"Store my field1 value\");\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.createCustomObjectByToken(accessToken, objectName,  json ,  new AsyncHandler\u003cUserCustomObjectData\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserCustomObjectData response) {\n  System.out.println(response.getCustomObject());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"CreateCustomObjectByUid-post-\"\u003eCreate 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```java\n\nString objectName = \"\u003cobjectName\u003e\"; //Required\nJsonObject json = new JsonObject(); //Required\njson.addProperty(\"field1\", \"Store my field1 value\");\nString uid = \"\u003cuid\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.createCustomObjectByUid(objectName,  json, uid ,  new AsyncHandler\u003cUserCustomObjectData\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserCustomObjectData response) {\n  System.out.println(response.getCustomObject());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetCustomObjectByToken-get-\"\u003eCustom 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString objectName = \"\u003cobjectName\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.getCustomObjectByToken(accessToken, objectName ,  new AsyncHandler\u003cListData\u003cUserCustomObjectData\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(ListData\u003cUserCustomObjectData\u003e response) {\n  System.out.println(response.getCount());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetCustomObjectByRecordIDAndToken-get-\"\u003eCustom 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.getCustomObjectByRecordIDAndToken(accessToken, objectName, objectRecordId ,  new AsyncHandler\u003cUserCustomObjectData\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserCustomObjectData response) {\n  System.out.println(response.getCustomObject());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetCustomObjectByUid-get-\"\u003eCustom 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```java\n\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString uid = \"\u003cuid\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.getCustomObjectByUid(objectName, uid ,  new AsyncHandler\u003cListData\u003cUserCustomObjectData\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(ListData\u003cUserCustomObjectData\u003e response) {\n  System.out.println(response.getCount());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"GetCustomObjectByRecordID-get-\"\u003eCustom 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```java\n\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\nString uid = \"\u003cuid\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.getCustomObjectByRecordID(objectName, objectRecordId, uid ,  new AsyncHandler\u003cUserCustomObjectData\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserCustomObjectData response) {\n  System.out.println(response.getCustomObject());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"DeleteCustomObjectByToken-delete-\"\u003eCustom 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.deleteCustomObjectByToken(accessToken, objectName, objectRecordId ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"DeleteCustomObjectByRecordID-delete-\"\u003eAccount 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```java\n\nString objectName = \"\u003cobjectName\u003e\"; //Required\nString objectRecordId = \"\u003cobjectRecordId\u003e\"; //Required\nString uid = \"\u003cuid\u003e\"; //Required\n\nCustomObjectApi customObjectApi = new CustomObjectApi();\ncustomObjectApi.deleteCustomObjectByRecordID(objectName, objectRecordId, uid ,  new AsyncHandler\u003cDeleteResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(DeleteResponse response) {\n  System.out.println(response.getIsDeleted());\n }\n});\n\n```\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\n\u003ch6 id=\"ResetPasswordByPhoneOTP-put-\"\u003ePhone 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```java\n\nResetPasswordByOTPModel resetPasswordByOTPModel = new ResetPasswordByOTPModel(); //Required\nresetPasswordByOTPModel.setOtp(\"otp\"); \nresetPasswordByOTPModel.setPassword(\"password\"); \nresetPasswordByOTPModel.setPhone(\"phone\"); \n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.resetPasswordByPhoneOTP( resetPasswordByOTPModel ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"PhoneVerificationByOTP-put-\"\u003ePhone 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```Java\n\nString otp = \"\u003cotp\u003e\"; //Required\nString phone = \"\u003cphone\u003e\"; //Required\nString fields = null; //Optional\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.phoneVerificationByOTP(otp, phone, fields, smsTemplate, isVoiceOtp ,  new AsyncHandler\u003cAccessToken\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessToken\u003cIdentity\u003e response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"PhoneVerificationOTPByAccessToken-put-\"\u003ePhone 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```Java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString otp = \"\u003cotp\u003e\"; //Required\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.phoneVerificationOTPByAccessToken(accessToken, otp, smsTemplate, isVoiceOtp ,  new AsyncHandler\u003cPostResponse\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(PostResponse response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"UpdatePhoneNumber-put-\"\u003ePhone 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```java\n\nString accessToken = \"\u003caccessToken\u003e\"; //Required\nString phone = \"\u003cphone\u003e\"; //Required\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.updatePhoneNumber(accessToken, phone, smsTemplate ,  new AsyncHandler\u003cUserProfilePostResponse\u003cSMSResponseData\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cSMSResponseData\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"LoginByPhone-post-\"\u003ePhone 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```java\n\nPhoneAuthenticationModel phoneAuthenticationModel = new PhoneAuthenticationModel(); //Required\nphoneAuthenticationModel.setPassword(\"password\"); \nphoneAuthenticationModel.setPhone(\"phone\"); \nString fields = null; //Optional\nString loginUrl = \"\u003cloginUrl\u003e\"; //Optional\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.loginByPhone( phoneAuthenticationModel, fields, loginUrl, smsTemplate ,  new AsyncHandler\u003cAccessToken\u003cIdentity\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(AccessToken\u003cIdentity\u003e response) {\n  System.out.println(response.getAccess_Token());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"ForgotPasswordByPhoneOTP-post-\"\u003ePhone 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```Java\n\nString phone = \"\u003cphone\u003e\"; //Required\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.forgotPasswordByPhoneOTP(phone, smsTemplate, isVoiceOtp ,  new AsyncHandler\u003cUserProfilePostResponse\u003cSmsResponseData\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cSmsResponseData\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"PhoneResendVerificationOTP-post-\"\u003ePhone 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```Java\n\nString phone = \"\u003cphone\u003e\"; //Required\nString smsTemplate = \"\u003csmsTemplate\u003e\"; //Optional\nBoolean isVoiceOtp = false; //Optional\n\nPhoneAuthenticationApi phoneAuthenticationApi = new PhoneAuthenticationApi();\nphoneAuthenticationApi.phoneResendVerificationOTP(phone, smsTemplate, isVoiceOtp ,  new AsyncHandler\u003cUserProfilePostResponse\u003cSmsResponseData\u003e\u003e (){\n\n@Override\n public void onFailure(ErrorResponse errorResponse) {\n System.out.println(errorResponse.getDescription());\n }\n @Override\n public void onSuccess(UserProfilePostResponse\u003cSmsResponseData\u003e response) {\n  System.out.println(response.getIsPosted());\n }\n});\n\n```\n\n  \n\n\n\n\n\u003ch6 id=\"PhoneResendVerificationOTPByToken-post-\"\u003ePhone 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://ww","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fjava-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floginradius%2Fjava-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fjava-sdk/lists"}