Validate 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
- Use the
validateUser()
function provided by thelmFeedClient
object created earlier. - Create an instance of
ValidateUserRequest
, as shown in the snippet and pass it to the above method. - Use the response as per your requirement
try {
const validateUserRequest = ValidateUserRequest.builder()
.setAccessToken("ENTER_ACCESS_TOKEN")
.setRefreshToken("ENTER_REFRESH_TOKEN")
.build();
const response = await lmFeedClient.validateUser(validateUserRequest);
// 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
Variable | Type | Description | Optional |
---|---|---|---|
accessToken | string | Access Token | |
refreshToken | string | Refresh Token |
ValidateUserResponse
Variable | Type | Description | Optional |
---|---|---|---|
accessToken | string | Access Token | |
refreshToken | string | Refresh Token | |
user | User | Refresh Token | |
community | Community | Refresh Token | |
appAccess | boolean | Refresh Token |
Community
Variable | Type | Description | Optional |
---|---|---|---|
id | string | Access Token | |
name | string | Refresh Token | |
imageUrl | string | Refresh Token | |
membersCount | int | Refresh Token | |
updatedAt | int | Refresh Token |