Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram getupdates error 'Telegram returned an invalid response' #468

Closed
therobb opened this issue Apr 17, 2017 · 2 comments
Closed

telegram getupdates error 'Telegram returned an invalid response' #468

therobb opened this issue Apr 17, 2017 · 2 comments

Comments

@therobb
Copy link

therobb commented Apr 17, 2017

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

@jacklul
Copy link
Collaborator

jacklul commented Apr 17, 2017

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

@jacklul jacklul closed this as completed Apr 23, 2017
@LuizFernandoAlmeida
Copy link

muito obrigado jacklul.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants