Set Profile Photo
wa_set_profile_photoChange the profile photo of one of your own WhatsApp accounts — the picture every contact sees. Pass image_base64 (JPEG, PNG or GIF, at most 5 MiB) to replace it: the image is center-cropped to a square and scaled to at most 640x640, as WhatsApp stores it. Or pass remove=true to delete the current photo. The previous photo cannot be restored afterwards. Contacts may keep seeing the old photo for a while until their app refreshes it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remove | No | true removes the account's current profile photo instead of replacing it; image_base64 must then be omitted | |
| account_id | Yes | the account whose own profile photo to change, as returned by wa_list_accounts | |
| image_base64 | No | the new photo: base64-encoded JPEG, PNG or GIF, at most 5 MiB decoded. It is center-cropped to a square and scaled to at most 640x640. Omit it when remove is true |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | No | the size of the JPEG that was uploaded; absent on a removal | |
| width | No | the stored photo's side in pixels (it is always square); absent on a removal | |
| status | Yes | ok (WhatsApp accepted the change) or refused (nothing was done) | |
| refusal | No | present only when status is refused | |
| summary | No | a human-readable result | |
| picture_id | No | the id WhatsApp assigned the new photo; absent on a removal |