TelegramBots / Telegram.Bot.Framework

Simple framework for building Telegram bots
MIT License
98 stars 43 forks source link

Error Could not create SSL/TLS secure channel #26

Open gerberasa opened 4 years ago

gerberasa commented 4 years ago

It seems telegram server requires TLS1.2. Add this before botclient.SendTextMessageAsync():

Net.ServicePointManager.SecurityProtocol = Net.SecurityProtocolType.Tls12