Skip to main content
The Profile feature provides methods for managing your own account’s display name, status text (about), and profile picture.

Access

Access profile operations through the client:

Methods

set_push_name

Set your display name (push name).
Parameters:
  • name - The new display name (cannot be empty)
Updates the local device store, sends a presence stanza with the new name, and propagates the change via app state sync for cross-device synchronization. Example:
The push name change takes effect immediately via presence, but app state sync may fail if keys aren’t available yet (e.g., right after pairing before initial sync completes).

set_status_text

Set your status text (about).
Parameters:
  • text - The new status text
Sets the profile “About” text. This is different from ephemeral text status updates. Example:

set_profile_picture

Set your profile picture.
Parameters:
  • image_data - JPEG image bytes
Returns:
  • SetProfilePictureResponse - Contains the new picture ID
The image should already be properly sized/cropped by the caller. WhatsApp typically uses 640x640 images. Example:
The image must be a valid JPEG. Other formats are not supported.

remove_profile_picture

Remove your profile picture.
Returns:
  • SetProfilePictureResponse - Confirmation of removal
Example:
Since v0.6 the remove IQ omits the <picture/> child entirely, matching WA Web’s SendProfilePictureJob. Sending an empty <picture> child was rejected by some hosts.

Types

SetProfilePictureResponse

Response from profile picture operations.

Complete example

Error handling

All methods return Result<T, ProfileError>:
Common errors:
  • InvalidArgument — e.g., empty push name
  • Iq — server rejected the status text or picture IQ
  • Client(ClientError::NotLoggedIn) — not authenticated
  • Internal — network errors, encoding failures

See also

  • Contacts - Get profile pictures for other users
  • Presence - Set online/offline status