From 77826d060862a24fc6d78a03b9b1e4267de598e8 Mon Sep 17 00:00:00 2001 From: lizandrogd <77708265+lizandrogd@users.noreply.github.com> Date: Wed, 21 Jan 2026 13:58:27 -0500 Subject: [PATCH] Update media-url.php --- api/version/media-url.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/version/media-url.php b/api/version/media-url.php index db3b280..0601349 100644 --- a/api/version/media-url.php +++ b/api/version/media-url.php @@ -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; }