Skip to content

Download media resources #134

Closed Answered by lCassieL
lCassieL asked this question in Q&A
Discussion options

You must be logged in to vote

I found solution to get the file - $response->body() :
$whatsapp_cloud_api = new WhatsAppCloudApi([
'from_phone_number_id' => WHATSAPP_PHONE_ID,
'access_token' => WHATSAPP_TOKEN,
]);
$response = $whatsapp_cloud_api->downloadMedia($media_id);
file_put_contents('files/image.jpg', $response->body());

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lCassieL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant