rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.68k stars 1.18k forks source link

Proxy Issues #146

Closed zachmatu closed 7 years ago

zachmatu commented 8 years ago

Hi rubenlagus ? Cannot register while behind proxy.. see error code below..

org.telegram.telegrambots.TelegramApiException: Error executing setWebook method

Caused by: java.net.UnknownHostException: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative

When i set BotOptions i get error below ..

org.telegram.telegrambots.TelegramApiException: Error deserializing setWebhook method response Caused by: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]

Am using IP address as proxy URL Thanks in Advance!!

spkmn commented 7 years ago

you can create botoptions object first then pass them...it works for me

rubenlagus commented 7 years ago

Duplicated #102

denred0 commented 7 years ago

@spkmn, hi! Can your post your code of using botoptions object for proxy?