I have configured everything and I send messages and they arrive in the group, I see the names of the users in the group, but I can't receive the messages written in the group I have a 419 error with webhook
{"ok":true,"result":{"url":"/telegram/webhook","has_custom_certificate":false,"pending_update_count":0,"last_error_date":1747810709,"last_error_message":"Wrong response from the webhook: 419 unknown status","max_connections":40,"ip_addr
I inserted it into the bootstrap/app.php file
->withMiddleware(function (Middleware $middleware) {
$middleware->validateCsrfTokens(except:[
'*telegram/webhook',
]);
})
I created the file
app/Http/Middleware/VerifyCsrfToken.php
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
}
and I created the file
app/Http/Kernel.php
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\VerifyCsrfToken::class,
],
'api' => [],
];
}
what did i do wrong or what did i forget? why doesn't it work?