Self-service account, display preference, presence, custom-status, external identity, and account lifecycle commands for the authenticated user. Public profile and avatar changes use UserService.
Summary
Functions
Updates or adds the authenticated user's password.
Confirms a verification code and adds the address to the account. Returns INVALID_ARGUMENT when the code is invalid or expired, and ALREADY_EXISTS when another user already controls the address. Returns FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
Deletes the current user's custom status. The call is idempotent and returns the resulting empty status state.
Permanently deletes the authenticated account after token validation. Requires user.delete-self.
Disconnects a provider identity from the authenticated account.
Reads the authenticated account's private saved availability choice.
Reads the authenticated user's display preferences without changing them. Returns default settings when none have been saved.
Lists configured external identity providers and identities linked to the authenticated account.
Lists the authenticated user's verified email addresses and primary choice. Returns FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
Refreshes connection liveness without changing the saved choice. Clients call every 30 seconds; liveness expires after 60 seconds without a refresh. Accounts with a saved OFFLINE choice may refresh without public presence signals.
Issues a short-lived token used to confirm self-deletion. Requires user.delete-self.
Sends a six-digit code to an email address that the authenticated user wants to add. The code expires after the server-configured email OTP lifetime. The client can request a new code after expiry. The server must have transactional email enabled. Returns ALREADY_EXISTS when the address is already verified for the user, RESOURCE_EXHAUSTED after too many code requests or attempts, and UNAVAILABLE when email delivery is disabled or fails. Returns FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
Sets the current user's complete custom status. Emoji and text are required. Omit expires_at for no expiry, or supply a future time.
Legacy live presence report, expiring after 60 seconds without refresh. A saved private choice overrides this report, including user_selected. New clients use SetPresencePreference for choices and RefreshPresence every 30 seconds for liveness.
Saves a choice for all devices on this server. A stale revision returns ABORTED. OFFLINE suppresses public presence and typing; the choice survives disconnects.
Selects one verified address for future account-directed email. Returns NOT_FOUND when the address is not verified for the authenticated user, and FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
Creates a short-lived browser handoff URL for linking a provider identity to the authenticated account. The provider callback completes through chatto.auth.v1.ExternalIdentityAuthService.ConfirmExternalIdentityLink.
Updates the authenticated user's display preferences.
Functions
@spec change_password(Req.Request.t(), Chatto.Api.V1.ChangePasswordRequest.t()) :: {:ok, Chatto.Api.V1.ChangePasswordResponse.t()} | {:error, Chatto.Connect.Error.t()}
Updates or adds the authenticated user's password.
@spec confirm_email_verification( Req.Request.t(), Chatto.Api.V1.ConfirmEmailVerificationRequest.t() ) :: {:ok, Chatto.Api.V1.ConfirmEmailVerificationResponse.t()} | {:error, Chatto.Connect.Error.t()}
Confirms a verification code and adds the address to the account. Returns INVALID_ARGUMENT when the code is invalid or expired, and ALREADY_EXISTS when another user already controls the address. Returns FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
@spec delete_custom_status( Req.Request.t(), Chatto.Api.V1.DeleteCustomStatusRequest.t() ) :: {:ok, Chatto.Api.V1.DeleteCustomStatusResponse.t()} | {:error, Chatto.Connect.Error.t()}
Deletes the current user's custom status. The call is idempotent and returns the resulting empty status state.
@spec delete_my_account(Req.Request.t(), Chatto.Api.V1.DeleteMyAccountRequest.t()) :: {:ok, Chatto.Api.V1.DeleteMyAccountResponse.t()} | {:error, Chatto.Connect.Error.t()}
Permanently deletes the authenticated account after token validation. Requires user.delete-self.
@spec disconnect_external_identity( Req.Request.t(), Chatto.Api.V1.DisconnectExternalIdentityRequest.t() ) :: {:ok, Chatto.Api.V1.DisconnectExternalIdentityResponse.t()} | {:error, Chatto.Connect.Error.t()}
Disconnects a provider identity from the authenticated account.
@spec get_presence_preference( Req.Request.t(), Chatto.Api.V1.GetPresencePreferenceRequest.t() ) :: {:ok, Chatto.Api.V1.GetPresencePreferenceResponse.t()} | {:error, Chatto.Connect.Error.t()}
Reads the authenticated account's private saved availability choice.
@spec get_settings(Req.Request.t(), Chatto.Api.V1.GetSettingsRequest.t()) :: {:ok, Chatto.Api.V1.GetSettingsResponse.t()} | {:error, Chatto.Connect.Error.t()}
Reads the authenticated user's display preferences without changing them. Returns default settings when none have been saved.
@spec list_external_identities( Req.Request.t(), Chatto.Api.V1.ListExternalIdentitiesRequest.t() ) :: {:ok, Chatto.Api.V1.ListExternalIdentitiesResponse.t()} | {:error, Chatto.Connect.Error.t()}
Lists configured external identity providers and identities linked to the authenticated account.
@spec list_verified_emails( Req.Request.t(), Chatto.Api.V1.ListVerifiedEmailsRequest.t() ) :: {:ok, Chatto.Api.V1.ListVerifiedEmailsResponse.t()} | {:error, Chatto.Connect.Error.t()}
Lists the authenticated user's verified email addresses and primary choice. Returns FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
@spec refresh_presence(Req.Request.t(), Chatto.Api.V1.RefreshPresenceRequest.t()) :: {:ok, Chatto.Api.V1.RefreshPresenceResponse.t()} | {:error, Chatto.Connect.Error.t()}
Refreshes connection liveness without changing the saved choice. Clients call every 30 seconds; liveness expires after 60 seconds without a refresh. Accounts with a saved OFFLINE choice may refresh without public presence signals.
@spec request_account_deletion( Req.Request.t(), Chatto.Api.V1.RequestAccountDeletionRequest.t() ) :: {:ok, Chatto.Api.V1.RequestAccountDeletionResponse.t()} | {:error, Chatto.Connect.Error.t()}
Issues a short-lived token used to confirm self-deletion. Requires user.delete-self.
@spec request_email_verification( Req.Request.t(), Chatto.Api.V1.RequestEmailVerificationRequest.t() ) :: {:ok, Chatto.Api.V1.RequestEmailVerificationResponse.t()} | {:error, Chatto.Connect.Error.t()}
Sends a six-digit code to an email address that the authenticated user wants to add. The code expires after the server-configured email OTP lifetime. The client can request a new code after expiry. The server must have transactional email enabled. Returns ALREADY_EXISTS when the address is already verified for the user, RESOURCE_EXHAUSTED after too many code requests or attempts, and UNAVAILABLE when email delivery is disabled or fails. Returns FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
@spec set_custom_status(Req.Request.t(), Chatto.Api.V1.SetCustomStatusRequest.t()) :: {:ok, Chatto.Api.V1.SetCustomStatusResponse.t()} | {:error, Chatto.Connect.Error.t()}
Sets the current user's complete custom status. Emoji and text are required. Omit expires_at for no expiry, or supply a future time.
@spec set_presence(Req.Request.t(), Chatto.Api.V1.SetPresenceRequest.t()) :: {:ok, Chatto.Api.V1.SetPresenceResponse.t()} | {:error, Chatto.Connect.Error.t()}
Legacy live presence report, expiring after 60 seconds without refresh. A saved private choice overrides this report, including user_selected. New clients use SetPresencePreference for choices and RefreshPresence every 30 seconds for liveness.
@spec set_presence_preference( Req.Request.t(), Chatto.Api.V1.SetPresencePreferenceRequest.t() ) :: {:ok, Chatto.Api.V1.SetPresencePreferenceResponse.t()} | {:error, Chatto.Connect.Error.t()}
Saves a choice for all devices on this server. A stale revision returns ABORTED. OFFLINE suppresses public presence and typing; the choice survives disconnects.
@spec set_primary_email(Req.Request.t(), Chatto.Api.V1.SetPrimaryEmailRequest.t()) :: {:ok, Chatto.Api.V1.SetPrimaryEmailResponse.t()} | {:error, Chatto.Connect.Error.t()}
Selects one verified address for future account-directed email. Returns NOT_FOUND when the address is not verified for the authenticated user, and FAILED_PRECONDITION when the authenticated account does not match expected_user_id.
@spec start_external_identity_link( Req.Request.t(), Chatto.Api.V1.StartExternalIdentityLinkRequest.t() ) :: {:ok, Chatto.Api.V1.StartExternalIdentityLinkResponse.t()} | {:error, Chatto.Connect.Error.t()}
Creates a short-lived browser handoff URL for linking a provider identity to the authenticated account. The provider callback completes through chatto.auth.v1.ExternalIdentityAuthService.ConfirmExternalIdentityLink.
@spec update_settings(Req.Request.t(), Chatto.Api.V1.UpdateSettingsRequest.t()) :: {:ok, Chatto.Api.V1.UpdateSettingsResponse.t()} | {:error, Chatto.Connect.Error.t()}
Updates the authenticated user's display preferences.