WhatsApp-Business-API-Setup-Scripts
WhatsApp-Business-API-Setup-Scripts copied to clipboard
Error "Invalid authentication token format [] []" even when the api key is correct
Hello, I'm running Whatsapp business api on-premise on a K8s cluster. There're liveness checks that call the endpoint /v1/health of the pod. However even when the authentication header is used correctly and the response is a 200 response, there're these errors in the logs of the pod Invalid authentication token format [] [].
The full logs of the request:
[2023-12-18 03:17:45.225373] app.INFO: [ed08b1ba330c4df5a13f6580e67b8ad4] Matched route "{route}". {"route":"GET_v1_health","route_parameters":{"_controller":"WhatsApp\\Controller\\HealthController::getHealth","_route":"GET_v1_health"},"request_uri":"http://localhost:8080/v1/health","method":"GET"} []
[2023-12-18 03:17:45.225647] app.ERROR: [ed08b1ba330c4df5a13f6580e67b8ad4] Invalid authentication token format [] []
[2023-12-18 03:17:45.225982] app.INFO: [ed08b1ba330c4df5a13f6580e67b8ad4] Guard authentication successful! {"token":"[object] (Symfony\\Component\\Security\\Guard\\Token\\PostAuthenticationGuardToken: PostAuthenticationGuardToken(user=\"_apiuser\", authenticated=true, roles=\"ROLE_API\"))","authenticator":"WhatsApp\\Security\\ApiKeyAuthenticator"} []
[2023-12-18 03:17:45.227685] app.INFO: [ed08b1ba330c4df5a13f6580e67b8ad4] Response: {"health":"[object] (stdClass: {\"gateway_status\":\"connected\"})","meta":"[object] (stdClass: {\"api_status\":\"stable\",\"version\":\"2.49.5\"})"} []
[2023-12-18 03:17:45.228020] app.INFO: [ed08b1ba330c4df5a13f6580e67b8ad4] Internal Request Ids: d200724be41d4d5abebf8d85c1fcaff9 [] []
[2023-12-18 03:17:45.228156] app.INFO: [ed08b1ba330c4df5a13f6580e67b8ad4] Request GET_/v1/health returns 200 in 31.96 ms [] []
The error is confusing. Is there any way to get rid of it?
Hi danhngo-lx (https://github.com/danhngo-lx),
Thank you for your comment. This GitHub repo is not actively monitored. If you need help, please check previously asked questions in the WA Business API Developer Community, or raise a Direct support ticket. Meanwhile, we are happy to continue with less time-sensitive discussions in GitHub.
Thanks for your understanding!