Manage user details

Retrieve user details from your app.

Get user details​

GetUser() returns data about a specific user, including all custom metadata by default.

Requires App Context

Enable App Context in the Admin Portal to store user data.

Method signature​

1chat.GetUser(
2 string userId
3)

Input​

* required
ParameterDescription
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() returns the current chat user.

Requires App Context

Enable App Context in the Admin Portal to store user data.

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

Was this page useful?

Last updated on