Running Telegram bot on Linux VM Azure
I am running a python Telegram bot on Azure, and it does not work at all. It does not connect to Telegram as it does not respond to commands. I am certain it is not the code because someone tried it on their server, and it works; therefore, it is a matter of installation. See the log below.
2019-01-08 16:33:25,586 - requests.packages.urllib3.connectionpool - DEBUG - "POST /api/v1/qe/sync/ HTTP/1.1" 200 3108
2019-01-08 16:33:25,594 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com
2019-01-08 16:33:25,691 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/friendships/autocomplete_user_list/ HTTP/1.1" 429 80
Request return 429 error!
{'message': 'Please wait a few minutes before you try again.', 'status': 'fail'}
2019-01-08 16:33:26,097 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/direct_v2/inbox/ HTTP/1.1" 404 0
Request return 404 error!
linux shell-script scripting python python3
New contributor
|
show 1 more comment
I am running a python Telegram bot on Azure, and it does not work at all. It does not connect to Telegram as it does not respond to commands. I am certain it is not the code because someone tried it on their server, and it works; therefore, it is a matter of installation. See the log below.
2019-01-08 16:33:25,586 - requests.packages.urllib3.connectionpool - DEBUG - "POST /api/v1/qe/sync/ HTTP/1.1" 200 3108
2019-01-08 16:33:25,594 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com
2019-01-08 16:33:25,691 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/friendships/autocomplete_user_list/ HTTP/1.1" 429 80
Request return 429 error!
{'message': 'Please wait a few minutes before you try again.', 'status': 'fail'}
2019-01-08 16:33:26,097 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/direct_v2/inbox/ HTTP/1.1" 404 0
Request return 404 error!
linux shell-script scripting python python3
New contributor
This looks like a remote error rather than a local one. HTTP 429 is 'Too Many Requests'. Are you honoring the rate limits applicable for this API?
– Haxiel
2 days ago
@Haxiel Thank you for your response! I am honoring the rate limits for the API. Also, based on the dropped connection, it seems to be the Instagram API. I am not sure why there's no connect to Telegram?
– nkgtech
2 days ago
On closer inspection, I can see that all of the URLs in your log are from the Instagram API. The Telegram Bot API uses a URL of the formathttps://api.telegram.org/bot<token>/METHOD_NAME
. You'll need to examine the code to figure out this discrepancy.
– Haxiel
2 days ago
@Haxiel it is there. I just didn't want to post the whole log because of the length- only the errors. '01-08 16:33:24,646 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com 2019-01-08 16:33:25,181 - telegram.vendor.ptb_urllib3.urllib3.connectionpool - DEBUG- api.telegram.org:443 "POST /bot700816500:AAEz0TCibSFYRRuirmSpl-uk-9i_7_aAlxQ/setWebhook HTTP/1.1" 200 57 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - True 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - Exiting: set_webhook'
– nkgtech
yesterday
Can you look through the log entries with the bot URL format, and see if you have any HTTP status codes other than 200?
– Haxiel
yesterday
|
show 1 more comment
I am running a python Telegram bot on Azure, and it does not work at all. It does not connect to Telegram as it does not respond to commands. I am certain it is not the code because someone tried it on their server, and it works; therefore, it is a matter of installation. See the log below.
2019-01-08 16:33:25,586 - requests.packages.urllib3.connectionpool - DEBUG - "POST /api/v1/qe/sync/ HTTP/1.1" 200 3108
2019-01-08 16:33:25,594 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com
2019-01-08 16:33:25,691 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/friendships/autocomplete_user_list/ HTTP/1.1" 429 80
Request return 429 error!
{'message': 'Please wait a few minutes before you try again.', 'status': 'fail'}
2019-01-08 16:33:26,097 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/direct_v2/inbox/ HTTP/1.1" 404 0
Request return 404 error!
linux shell-script scripting python python3
New contributor
I am running a python Telegram bot on Azure, and it does not work at all. It does not connect to Telegram as it does not respond to commands. I am certain it is not the code because someone tried it on their server, and it works; therefore, it is a matter of installation. See the log below.
2019-01-08 16:33:25,586 - requests.packages.urllib3.connectionpool - DEBUG - "POST /api/v1/qe/sync/ HTTP/1.1" 200 3108
2019-01-08 16:33:25,594 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com
2019-01-08 16:33:25,691 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/friendships/autocomplete_user_list/ HTTP/1.1" 429 80
Request return 429 error!
{'message': 'Please wait a few minutes before you try again.', 'status': 'fail'}
2019-01-08 16:33:26,097 - requests.packages.urllib3.connectionpool - DEBUG - "GET /api/v1/direct_v2/inbox/ HTTP/1.1" 404 0
Request return 404 error!
linux shell-script scripting python python3
linux shell-script scripting python python3
New contributor
New contributor
edited Jan 8 at 17:05
G-Man
13k93365
13k93365
New contributor
asked Jan 8 at 16:55
nkgtechnkgtech
11
11
New contributor
New contributor
This looks like a remote error rather than a local one. HTTP 429 is 'Too Many Requests'. Are you honoring the rate limits applicable for this API?
– Haxiel
2 days ago
@Haxiel Thank you for your response! I am honoring the rate limits for the API. Also, based on the dropped connection, it seems to be the Instagram API. I am not sure why there's no connect to Telegram?
– nkgtech
2 days ago
On closer inspection, I can see that all of the URLs in your log are from the Instagram API. The Telegram Bot API uses a URL of the formathttps://api.telegram.org/bot<token>/METHOD_NAME
. You'll need to examine the code to figure out this discrepancy.
– Haxiel
2 days ago
@Haxiel it is there. I just didn't want to post the whole log because of the length- only the errors. '01-08 16:33:24,646 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com 2019-01-08 16:33:25,181 - telegram.vendor.ptb_urllib3.urllib3.connectionpool - DEBUG- api.telegram.org:443 "POST /bot700816500:AAEz0TCibSFYRRuirmSpl-uk-9i_7_aAlxQ/setWebhook HTTP/1.1" 200 57 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - True 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - Exiting: set_webhook'
– nkgtech
yesterday
Can you look through the log entries with the bot URL format, and see if you have any HTTP status codes other than 200?
– Haxiel
yesterday
|
show 1 more comment
This looks like a remote error rather than a local one. HTTP 429 is 'Too Many Requests'. Are you honoring the rate limits applicable for this API?
– Haxiel
2 days ago
@Haxiel Thank you for your response! I am honoring the rate limits for the API. Also, based on the dropped connection, it seems to be the Instagram API. I am not sure why there's no connect to Telegram?
– nkgtech
2 days ago
On closer inspection, I can see that all of the URLs in your log are from the Instagram API. The Telegram Bot API uses a URL of the formathttps://api.telegram.org/bot<token>/METHOD_NAME
. You'll need to examine the code to figure out this discrepancy.
– Haxiel
2 days ago
@Haxiel it is there. I just didn't want to post the whole log because of the length- only the errors. '01-08 16:33:24,646 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com 2019-01-08 16:33:25,181 - telegram.vendor.ptb_urllib3.urllib3.connectionpool - DEBUG- api.telegram.org:443 "POST /bot700816500:AAEz0TCibSFYRRuirmSpl-uk-9i_7_aAlxQ/setWebhook HTTP/1.1" 200 57 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - True 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - Exiting: set_webhook'
– nkgtech
yesterday
Can you look through the log entries with the bot URL format, and see if you have any HTTP status codes other than 200?
– Haxiel
yesterday
This looks like a remote error rather than a local one. HTTP 429 is 'Too Many Requests'. Are you honoring the rate limits applicable for this API?
– Haxiel
2 days ago
This looks like a remote error rather than a local one. HTTP 429 is 'Too Many Requests'. Are you honoring the rate limits applicable for this API?
– Haxiel
2 days ago
@Haxiel Thank you for your response! I am honoring the rate limits for the API. Also, based on the dropped connection, it seems to be the Instagram API. I am not sure why there's no connect to Telegram?
– nkgtech
2 days ago
@Haxiel Thank you for your response! I am honoring the rate limits for the API. Also, based on the dropped connection, it seems to be the Instagram API. I am not sure why there's no connect to Telegram?
– nkgtech
2 days ago
On closer inspection, I can see that all of the URLs in your log are from the Instagram API. The Telegram Bot API uses a URL of the format
https://api.telegram.org/bot<token>/METHOD_NAME
. You'll need to examine the code to figure out this discrepancy.– Haxiel
2 days ago
On closer inspection, I can see that all of the URLs in your log are from the Instagram API. The Telegram Bot API uses a URL of the format
https://api.telegram.org/bot<token>/METHOD_NAME
. You'll need to examine the code to figure out this discrepancy.– Haxiel
2 days ago
@Haxiel it is there. I just didn't want to post the whole log because of the length- only the errors. '01-08 16:33:24,646 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com 2019-01-08 16:33:25,181 - telegram.vendor.ptb_urllib3.urllib3.connectionpool - DEBUG- api.telegram.org:443 "POST /bot700816500:AAEz0TCibSFYRRuirmSpl-uk-9i_7_aAlxQ/setWebhook HTTP/1.1" 200 57 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - True 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - Exiting: set_webhook'
– nkgtech
yesterday
@Haxiel it is there. I just didn't want to post the whole log because of the length- only the errors. '01-08 16:33:24,646 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com 2019-01-08 16:33:25,181 - telegram.vendor.ptb_urllib3.urllib3.connectionpool - DEBUG- api.telegram.org:443 "POST /bot700816500:AAEz0TCibSFYRRuirmSpl-uk-9i_7_aAlxQ/setWebhook HTTP/1.1" 200 57 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - True 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - Exiting: set_webhook'
– nkgtech
yesterday
Can you look through the log entries with the bot URL format, and see if you have any HTTP status codes other than 200?
– Haxiel
yesterday
Can you look through the log entries with the bot URL format, and see if you have any HTTP status codes other than 200?
– Haxiel
yesterday
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
nkgtech is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493283%2frunning-telegram-bot-on-linux-vm-azure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
nkgtech is a new contributor. Be nice, and check out our Code of Conduct.
nkgtech is a new contributor. Be nice, and check out our Code of Conduct.
nkgtech is a new contributor. Be nice, and check out our Code of Conduct.
nkgtech is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493283%2frunning-telegram-bot-on-linux-vm-azure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This looks like a remote error rather than a local one. HTTP 429 is 'Too Many Requests'. Are you honoring the rate limits applicable for this API?
– Haxiel
2 days ago
@Haxiel Thank you for your response! I am honoring the rate limits for the API. Also, based on the dropped connection, it seems to be the Instagram API. I am not sure why there's no connect to Telegram?
– nkgtech
2 days ago
On closer inspection, I can see that all of the URLs in your log are from the Instagram API. The Telegram Bot API uses a URL of the format
https://api.telegram.org/bot<token>/METHOD_NAME
. You'll need to examine the code to figure out this discrepancy.– Haxiel
2 days ago
@Haxiel it is there. I just didn't want to post the whole log because of the length- only the errors. '01-08 16:33:24,646 - requests.packages.urllib3.connectionpool - INFO - Resetting dropped connection: i.instagram.com 2019-01-08 16:33:25,181 - telegram.vendor.ptb_urllib3.urllib3.connectionpool - DEBUG- api.telegram.org:443 "POST /bot700816500:AAEz0TCibSFYRRuirmSpl-uk-9i_7_aAlxQ/setWebhook HTTP/1.1" 200 57 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - True 2019-01-08 16:33:25,183 - telegram.bot - DEBUG - Exiting: set_webhook'
– nkgtech
yesterday
Can you look through the log entries with the bot URL format, and see if you have any HTTP status codes other than 200?
– Haxiel
yesterday