Telegram-bot-sdk: TelegramSDKException in GuzzleHttpClient.php line 114:

Created on 28 May 2017  路  3Comments  路  Source: irazasyed/telegram-bot-sdk

im beginer in laravel

i have problem in run this code

`
use Telegram\Bot\Laravel\Facades\Telegram;

Route::get('/', function () {
$updates = Telegram::getUpdates();
dd($updates);
});
`

error code :
TelegramSDKException in GuzzleHttpClient.php line 114: cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
please help me step by step

Most helpful comment

i have same problem like that. maybe this can solve your problem
go to "vendor\irazasyed\telegram-bot-sdk\src\HttpClients" and open "GuzzleHttpClient.php"
edit
$this->client = $client ?: new Client();
in my file line 49 to
$this->client = $client ?: new Client(['verify' => false ]);
this can solve my guzzle error because access https telegram.

All 3 comments

Did you create your own SSL cert to test this with?

Did you follow these instructions?

https://core.telegram.org/bots/api#setwebhook
https://core.telegram.org/bots/self-signed

i have same problem like that. maybe this can solve your problem
go to "vendor\irazasyed\telegram-bot-sdk\src\HttpClients" and open "GuzzleHttpClient.php"
edit
$this->client = $client ?: new Client();
in my file line 49 to
$this->client = $client ?: new Client(['verify' => false ]);
this can solve my guzzle error because access https telegram.

You don't should any change files of core framework.

Fore resolve this problem:

  • First download this file: https://curl.se/ca/cacert.pem
  • And then put this in php.ini file:
    curl.cainfo=PATH\cacert.pem
  • The PATH in here is absolute location of cacert.pem file.
  • And then restart web service.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

khalilst picture khalilst  路  3Comments

danilopinotti picture danilopinotti  路  3Comments

hafezd picture hafezd  路  3Comments

mccarlosen picture mccarlosen  路  3Comments

realtebo picture realtebo  路  4Comments