$httpCode, 'response' => json_decode($response, true) ]; } // Test 2: getUpdates - Obtener actualizaciones recientes function testGetUpdates($token) { $ch = curl_init("https://api.telegram.org/bot{$token}/getUpdates?limit=5"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return [ 'http_code' => $httpCode, 'response' => json_decode($response, true) ]; } $testGetMe = testGetMe($botToken); $testUpdates = testGetUpdates($botToken); ?>
Nombre:
Username: @
ID:
Permite inline:
Mensajes recientes:
Token:
Si todos los tests pasan, tu bot está correctamente configurado y listo para usarse.
El bot puede funcionar con webhook (HTTP) o polling (daemon). Actualmente usamos polling con Supervisor. Si prefieres usar webhook, configúralo aquí: