Core: telegram getupdates error 'Telegram returned an invalid response'

Created on 17 Apr 2017  路  2Comments  路  Source: php-telegram-bot/core

Required Information

  • PHP version: 5.6.23
  • PHP Telegram Bot version: last update
  • Using MySQL database: yes
  • Update Method: getUpdates

Actual behaviour


getUpdatesCLI.php returns:

php exception 'Longman\TelegramBot\Exception\TelegramException' with message 'Telegram returned an invalid response! Please review your bot name and API key.' in E:\xampp\htdocs\core-master\src\Request.php:333 Stack trace: #0 E:\xampp\htdocs\core-master\src\Request.php(808): Longman\TelegramBot\Request::send('getUpdates', Array) #1 E:\xampp\htdocs\core-master\src\Telegram.php(340): Longman\TelegramBot\Request::getUpdates(Array) #2 E:\xampp\htdocs\core-master\getUpdatesCLI.php(73): Longman\TelegramBot\Telegram->handleGetUpdates() #3 {main}

Steps to reproduce


API key is correct, double-checked and is fine

Most helpful comment

edit by @noplanman: #536 allows you to disable verification without modifying core files, please use that instead!


Windows issue.

As a development workaround:

Replace in Telegram.php, Request.php:

new Client(['base_uri' => self::$api_base_uri]);

with:

new Client(['base_uri' => self::$api_base_uri, 'verify' => false]);

If you plan on using Botan integration you have to do the same inside Botan.php

All 2 comments

edit by @noplanman: #536 allows you to disable verification without modifying core files, please use that instead!


Windows issue.

As a development workaround:

Replace in Telegram.php, Request.php:

new Client(['base_uri' => self::$api_base_uri]);

with:

new Client(['base_uri' => self::$api_base_uri, 'verify' => false]);

If you plan on using Botan integration you have to do the same inside Botan.php

muito obrigado jacklul.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vansanblch picture vansanblch  路  3Comments

esomkin picture esomkin  路  3Comments

marcolino7 picture marcolino7  路  3Comments

NabiKAZ picture NabiKAZ  路  4Comments

sineverba picture sineverba  路  3Comments