-
I receive a message from a client with a file, I recognize its . How can I download this file to a specific directory? |
Beta Was this translation helpful? Give feedback.
Answered by
lCassieL
Sep 4, 2023
Replies: 1 comment
-
I found solution to get the file - $response->body() : |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lCassieL
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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());