Skip to main content

Initiate User

To start using the LikeMinds Feed and enable personalized experiences for your users, you need to validate them within the system. This process associates a user in your application with a user in the LikeMinds Feed, allowing for seamless integration and personalized recommendations.

Steps to validate a User

  1. Use the InitiateUser() function provided by the lmFeedClient object created earlier.
  2. Create an instance of InititateUserRequest, as shown in the snippet and pass it to the above method.
  3. Use the response as per your requirement
try {
const initiateUserRequest = InitiateUserRequest.builder()
.setUUID("ENTER UUID HERE")
.setIsGuest("ENTER GUEST STATUS HERE")
.setUserName("ENTER USERNAME HERE")
.setApiKey("ENTER API KEY HERE")
.build();

const response = await lmFeedClient.initiateUser(initiateUserRequest);
// Use the response as per your requirement.
} catch (error) {
// Use the error as per your requirement.
}
tip

We suggest that you use the unique ID from your database for the user so that you do not have to save the one we generate.

Models

ValidateUserRequest

VariableTypeDescriptionOptional
uuidstringUUID of the user
usernamestringUsername of the user
apikeystringYour API key
isGueststringGuest status✔️

ValidateUserResponse

VariableTypeDescriptionOptional
accessTokenstringAccess Token
refreshTokenstringRefresh Token
userUserRefresh Token
communityCommunityRefresh Token
appAccessbooleanRefresh Token