UserService
Chatto exposes this service below /api/connect.
Shared message and enum definitions are documented in Shared Types And Enums.
UserService
Section titled “UserService”Reads users and manages public user profiles and avatars.
ListUsers
Section titled “ListUsers”Lists users visible to the authenticated user. Admin-sensitive account fields stay out of this public row shape.
POST /api/connect/chatto.api.v1.UserService/ListUsersInput: ListUsersRequest
Section titled “Input: ListUsersRequest”Request for users visible to the authenticated user. Results use creation time, oldest first. Users without a creation time appear last, ordered by case-insensitive login.
| Field | Type | Description |
|---|---|---|
search | string | Optional case-insensitive search against login and display name. |
page | PageRequest | Defaults to 20 results when absent or limit is zero. Maximum: 500. |
Result: ListUsersResponse
Section titled “Result: ListUsersResponse”User directory page.
| Field | Type | Description |
|---|---|---|
users | repeated DirectoryMember | Users in the requested page. |
page | PageInfo | Page metadata. |
GetUser
Section titled “GetUser”Gets one visible user by user ID or login. Returns NOT_FOUND when the target is unknown.
POST /api/connect/chatto.api.v1.UserService/GetUserInput: GetUserRequest
Section titled “Input: GetUserRequest”Request one visible user by stable user ID or login.
| Field | Type | Description |
|---|---|---|
target.user_id | string | Target stable user ID. |
target.login | string | Target login identifier. |
Result: GetUserResponse
Section titled “Result: GetUserResponse”User directory response.
| Field | Type | Description |
|---|---|---|
user | DirectoryMember | Requested user. |
BatchGetUsers
Section titled “BatchGetUsers”Gets visible user rows for multiple stable user IDs. Unknown IDs are omitted from the response.
POST /api/connect/chatto.api.v1.UserService/BatchGetUsersInput: BatchGetUsersRequest
Section titled “Input: BatchGetUsersRequest”Request user directory rows for a set of stable user IDs.
| Field | Type | Description |
|---|---|---|
user_ids | repeated string | Required target user IDs. Unknown IDs are omitted from the response. |
Result: BatchGetUsersResponse
Section titled “Result: BatchGetUsersResponse”Batch user directory response.
| Field | Type | Description |
|---|---|---|
users | repeated DirectoryMember | Found users. The server preserves first-seen request order and de-duplicates repeated IDs. |
UpdateUserProfile
Section titled “UpdateUserProfile”Updates the target user’s login, display name, and/or bio. Users can update themselves. Updating another human requires user.manage-accounts. A caller who updates another bot needs ownership of the bot, user.manage-accounts, or bot.manage. Bot callers use the same permission checks. A login change returns FAILED_PRECONDITION while the target’s username-change cooldown is active. A successful login change starts a new cooldown. This also applies when a bot owner or bot manager changes a bot’s login. A caller with user.manage-accounts bypasses the cooldown and does not start it. A case-only change does not check or start the cooldown. Unknown or deleted targets return NOT_FOUND. An invalid ID or a request without a selected field returns INVALID_ARGUMENT.
POST /api/connect/chatto.api.v1.UserService/UpdateUserProfileInput: UpdateUserProfileRequest
Section titled “Input: UpdateUserProfileRequest”Request to update one user’s public profile. update_mask selects fields to apply or reset. Fields outside the mask stay unchanged.
| Field | Type | Description |
|---|---|---|
user_id | string | Required target user ID. Self-updates are allowed. Updating another user requires the applicable account-management or bot-management authority. |
display_name | optional string | New non-empty display name. The server also rejects control and confusing invisible characters. |
login | optional string | New login identifier, when changing it. The server accepts ASCII letters, digits, period, underscore, and hyphen, starting with a letter or digit. |
bio | optional string | New Markdown biography, when changing it. Empty clears the bio. |
update_mask | google.protobuf.FieldMask | Editable fields to apply or reset: display_name, login, bio. Omit to infer populated fields; * selects all editable fields. An explicit empty mask is invalid. Unselected values are ignored. Selected absent values reset the field to its default, subject to field validation. |
Result: UpdateUserProfileResponse
Section titled “Result: UpdateUserProfileResponse”Result of a user profile update.
| Field | Type | Description |
|---|---|---|
user | User | Updated user profile. |
UploadAvatar
Section titled “UploadAvatar”Uploads and sets an avatar for the target user. Users can update themselves. Updating another human requires user.manage-accounts. A caller who updates another bot needs ownership of the bot, user.manage-accounts, or bot.manage. Bot callers use the same permission checks. Unknown or deleted targets return NOT_FOUND. Invalid IDs or missing images return INVALID_ARGUMENT.
POST /api/connect/chatto.api.v1.UserService/UploadAvatarInput: UploadAvatarRequest
Section titled “Input: UploadAvatarRequest”Request to upload and set one user’s avatar.
| Field | Type | Description |
|---|---|---|
image | ImageUpload | Image payload. The server validates, resizes, and stores a WebP avatar. |
user_id | string | Required target user ID. Self-updates are allowed. Updating another user requires the applicable account-management or bot-management authority. |
Result: UploadAvatarResponse
Section titled “Result: UploadAvatarResponse”Result of uploading one user’s avatar.
| Field | Type | Description |
|---|---|---|
user | User | Updated user profile. |
DeleteAvatar
Section titled “DeleteAvatar”Deletes the target user’s avatar. Authorization matches UploadAvatar. The call is idempotent. Unknown or deleted targets return NOT_FOUND. An invalid ID returns INVALID_ARGUMENT.
POST /api/connect/chatto.api.v1.UserService/DeleteAvatarInput: DeleteAvatarRequest
Section titled “Input: DeleteAvatarRequest”Request to delete one user’s avatar.
| Field | Type | Description |
|---|---|---|
user_id | string | Required target user ID. Self-updates are allowed. Updating another user requires the applicable account-management or bot-management authority. |
Result: DeleteAvatarResponse
Section titled “Result: DeleteAvatarResponse”Result of deleting one user’s avatar.
| Field | Type | Description |
|---|---|---|
user | User | Updated user profile. |