UserClient reference
Complete reference for the UserClient in the Knock JavaScript SDK.
Client for interacting with user-related operations in the Knock API.
Methods#
get
#Retrieves the current, authenticated user by calling the get user endpoint directly from the client.
Returns: Promise<ApiResponse>
Example:
identify
#Identifies a user by calling the identify user endpoint directly from the client.
Parameters:
Returns: Promise<ApiResponse>
Example:
getAllPreferences
#Retrieves all preferences for the authenticated user by calling the get preferences endpoint directly from the client.
Returns: Promise<ApiResponse>
Example:
getPreferences
#Retrieves a preference set for the authenticated user by calling the get preferences endpoint directly from the client.
Parameters:
Returns: Promise<ApiResponse>
Example:
setPreferences
#Updates the authenticated user's preferences by calling the set preferences endpoint directly from the client.
Parameters:
Returns: Promise<ApiResponse>
Example:
getChannelData
#Retrieves channel data for the authenticated user by calling the get channel data endpoint directly from the client.
Parameters:
Returns: Promise<ApiResponse>
Example:
setChannelData
#Updates the channel data for the current user by calling the set channel data endpoint directly from the client.
Parameters:
Returns: Promise<ApiResponse>
Example: