Update media-url.php

This commit is contained in:
lizandrogd
2026-01-21 13:58:27 -05:00
parent a00e44e730
commit 77826d0608
+6 -2
View File
@@ -143,9 +143,13 @@ if ($providedUrl) {
if (empty($token)) {
media_log("Missing whatsapp_token for Graph API request to {$endpoint}");
http_response_code(500);
http_response_code(400);
header('Content-Type: application/json; charset=utf-8');
echo json_encode(['success' => false, 'error' => 'Missing whatsapp_token in configuration']);
echo json_encode([
'success' => false,
'error' => 'Missing whatsapp_token in configuration',
'hint' => 'Set the token using /configurar_whatsapp.php or insert into system_config (key: whatsapp_token). Run verificar_token.php to validate.'
]);
exit;
}