diff --git a/api/upload_whatsapp_profile_photo.php b/api/upload_whatsapp_profile_photo.php index 9b0876f..170f0de 100644 --- a/api/upload_whatsapp_profile_photo.php +++ b/api/upload_whatsapp_profile_photo.php @@ -99,11 +99,11 @@ try { $uploadSessionId = $sessionData['id']; // ── Paso 2: Subir el archivo binario ────────────────────────────────────── - // POST https://rupload.facebook.com/whatsapp-business-profile/{session_id} + // POST https://graph.facebook.com/{version}/{upload_session_id} $fileContent = file_get_contents($file['tmp_name']); if ($fileContent === false) throw new Exception("No se pudo leer el archivo temporal"); - $uploadUrl = "https://rupload.facebook.com/whatsapp-business-profile/{$uploadSessionId}"; + $uploadUrl = "https://graph.facebook.com/{$apiVersion}/{$uploadSessionId}"; $ch2 = curl_init(); curl_setopt_array($ch2, [