Skip to content
Chatto v0.5.0

UserService

Chatto exposes this service below /api/connect.

Shared message and enum definitions are documented in Shared Types And Enums.

Reads users and manages public user profiles and avatars.

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/ListUsers

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.

FieldTypeDescription
searchstringOptional case-insensitive search against login and display name.
pagePageRequestDefaults to 20 results when absent or limit is zero. Maximum: 500.

User directory page.

FieldTypeDescription
usersrepeated DirectoryMemberUsers in the requested page.
pagePageInfoPage metadata.

Gets one visible user by user ID or login. Returns NOT_FOUND when the target is unknown.

POST /api/connect/chatto.api.v1.UserService/GetUser

Request one visible user by stable user ID or login.

FieldTypeDescription
target.user_idstringTarget stable user ID.
target.loginstringTarget login identifier.

User directory response.

FieldTypeDescription
userDirectoryMemberRequested user.

Gets visible user rows for multiple stable user IDs. Unknown IDs are omitted from the response.

POST /api/connect/chatto.api.v1.UserService/BatchGetUsers

Request user directory rows for a set of stable user IDs.

FieldTypeDescription
user_idsrepeated stringRequired target user IDs. Unknown IDs are omitted from the response.

Batch user directory response.

FieldTypeDescription
usersrepeated DirectoryMemberFound users. The server preserves first-seen request order and de-duplicates repeated IDs.

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/UpdateUserProfile

Request to update one user’s public profile. update_mask selects fields to apply or reset. Fields outside the mask stay unchanged.

FieldTypeDescription
user_idstringRequired target user ID. Self-updates are allowed. Updating another user requires the applicable account-management or bot-management authority.
display_nameoptional stringNew non-empty display name. The server also rejects control and confusing invisible characters.
loginoptional stringNew login identifier, when changing it. The server accepts ASCII letters, digits, period, underscore, and hyphen, starting with a letter or digit.
biooptional stringNew Markdown biography, when changing it. Empty clears the bio.
update_maskgoogle.protobuf.FieldMaskEditable 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 of a user profile update.

FieldTypeDescription
userUserUpdated user profile.

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/UploadAvatar

Request to upload and set one user’s avatar.

FieldTypeDescription
imageImageUploadImage payload. The server validates, resizes, and stores a WebP avatar.
user_idstringRequired target user ID. Self-updates are allowed. Updating another user requires the applicable account-management or bot-management authority.

Result of uploading one user’s avatar.

FieldTypeDescription
userUserUpdated user profile.

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/DeleteAvatar

Request to delete one user’s avatar.

FieldTypeDescription
user_idstringRequired target user ID. Self-updates are allowed. Updating another user requires the applicable account-management or bot-management authority.

Result of deleting one user’s avatar.

FieldTypeDescription
userUserUpdated user profile.