Manage user details
Get details about the app users.
Get user details
Return data about a specific user with the GetUser()
method.
By default, this method returns all custom user metadata without the need to define that during the call explicitly.
Requires App Context
To store data about users, you must enable App Context for your app's keyset in the Admin Portal.
Method signature
1chat.GetUser(
2 string userId
3)
Input
Parameter | Description |
---|---|
userId *Type: string Default: n/a | Unique user identifier (up to 92 UTF-8 characters). |
Output
The method returns an awaitable Task<ChatOperationResult<User>>
with the User
object if it exists, otherwise the Error
property on the result will be true.
Sample code
Get details on user support_agent_15
.
1
Get current user
GetCurrentUser()
is a method that returns the current chat user of the chat app.
Requires App Context
To store data about users, you must enable App Context for your app's keyset in the Admin Portal.
Method signature
1chat.GetCurrentUser()
Input
This method doesn't take any parameters.
Output
The method returns an awaitable Task<ChatOperationResult<User>>
with the found User
object.
Sample code
Return the current chat user.
1