Use this file to discover all available pages before exploring further.
The WPP.profile module exposes functions for reading and writing the connected account’s own profile data. You can retrieve or change the display name, the “about” text, and the profile picture, as well as check whether the account is a WhatsApp Business account and edit Business-specific fields such as description, address, business hours, and categories.
Uploads a new profile picture for the connected account. The image is automatically resized to both thumbnail (96×96) and full size (640×640) before upload.Signature
Returns whether the connected account is a WhatsApp Business account. This is a synchronous call.Signature
isBusiness(): boolean | undefined
Returns — boolean | undefined — true for Business accounts, false for personal accounts, or undefined if the connection state is not yet resolved.Example
if (WPP.profile.isBusiness()) { console.log('This is a Business account');}
Updates fields on the WhatsApp Business profile. Only the fields you include in params are changed; omitted fields are left unchanged.
This function throws a WPPError with code NOT_BUSINESS_PROFILE if the connected account is not a WhatsApp Business account. Always call isBusiness() first to guard against this error.
The following example shows a full profile refresh — updating name, about text, and picture in sequence:
// 1. Read current valuesconst currentName = WPP.profile.getMyProfileName();const currentAbout = await WPP.profile.getMyStatus();console.log('Current name:', currentName);console.log('Current about:', currentAbout);// 2. Update display nameawait WPP.profile.setMyProfileName('Acme Support Bot');// 3. Update about textawait WPP.profile.setMyStatus('Automated support — replies within 5 min');// 4. Upload a new profile picture from a URLconst response = await fetch('https://example.com/avatar.jpg');const blob = await response.blob();const dataUri = await new Promise((resolve) => { const reader = new FileReader(); reader.onload = () => resolve(reader.result); reader.readAsDataURL(blob);});await WPP.profile.setMyProfilePicture(dataUri);console.log('Profile updated successfully');
For WhatsApp Business accounts, combine editBusinessProfile() with the personal profile calls above to keep both the personal and business-facing profile information in sync.