Skip to content

Set Profile Picture

Set your WhatsApp profile picture.

Usage

php
use NjoguAmos\Waha\Facades\Profile;

/** @var \Saloon\Http\Response $response */
$response = Profile::setPicture(file: 'https://example.com/photo.jpg');
php
use NjoguAmos\Waha\Facades\Profile;

/** @var \Saloon\Http\Response $response */
$response = Profile::setPicture(file: 'data:image/jpeg;base64,/9j/4AAQSkZJRg==');
php
use NjoguAmos\Waha\Facades\Profile;

/** @var \Saloon\Http\Response $response */
$response = Profile::setPicture(file: 'https://example.com/photo.jpg', session: 'my-session');

Parameters

ParameterTypeRequiredDescription
filestringYesThe image file. Can be a URL or base64 encoded data with data URI.
sessionstringNoSession name (defaults to waha.session config)

Response

The response returned by the setPicture method is an instance of Saloon\Http\Response:

php
/** @var \Saloon\Http\Response $response */

$response->status(); // 200
$response->json();   // ["success" => true]

Engines

WEBJSWPPNOWEBGOWS

➕ = PLUS version only

References

Released under the MIT License.