Telegram Bot Webhook Time Out - telegram

I have a problem with my Telegram bot. I am using the Telegram webhook to receive message updates from the bot.
My chatbot worked fine for the last couple of months, but recently, the telegram bot wasn't answering bot commands. I've checked the webhook with the "https://api.telegram.org/bot\<token\>/getWebhookInfo", and I get the error:
"has_custom_certificate":false,"pending_update_count":2,"last_error_date":1649142590,"last_error_message":"Connection timed out","max_connections":40,
I tried to delete the webhook and reset it, but the error still occurred.
Has anyone dealt with this error and knows how to get rid of it?

Related

Send Telegram message as a user

I want to know if it possible to send message to my telegram bot as a user.
Maybe I should send a request with my credentials? Or I am completely missing something?
UPD:
Ok I see it is not clear. I want to send message using program.
Open your Telegram App, search for your bot and open the chat with it. Then type a message and hit send.

How to make my Telegram Bot to add me back to a private channel?

I have a Telegram Bot and I HAD a Private channel. I added my bot to this channel as an Administrator so it can send messages on this channel using the API. It's ok, everything's working fine.
But now, I accidentally deleted the channel from my chat list. My bot is still an administrator and is not failing on sending the messages to the channel.
I guess the channel still exists, and the bot is the only administrator on it.
I want to know how can I make my bot add me back to the channel, as I can't do it by myself, because the channel is private. I made the bot backend using C#, I have the ChatID and the Bot Token.
Thanks!
Ok, I found by myself. Just make a post request to:
https://api.telegram.org/bot[Token]/exportChatInviteLink
Passing the chat_id parameter, and it'll return the invite link.
But there's a catch: When I added the bot to the channel, I did not allowed it to invite others... So now I'm locked out for sure.

get seen count of Telegram messages in php

I want to get the message's seen count via Telegram bot api, telegram cli or other ways.
I have all message ids and the Telegram bot is admin in my channel.
Please guide me.
Unfortunately, you can not get this type of data by bot at this time. :(

telegram bot api - get all messages in a group

I'm working on Telegram bot api in my java application. I have created a super group and add my bot to this as an administrator. I want to get all messages in that super group(not deleted messages) via bot. Is there any useful method for doing that?
Yes. first, you should "disable" privacy of your bot so it can access to all messages in groups. second, use getUpdates to see recent updates and user messages will be there.

Telegram api send frequently message to our api

I have a problem with telegram bot api.
when i was set webhook,then one of client send a photo to our bot and telegram api send frequently obejct of this photo to our api with the same update_id
this is answer from telegram support:
most probably issue is that you are not answering with a "2XX" to our requests, so we are sending the same updete as we understand that it wasn't received.
whats problem?!
The problem is you are not returning the proper status code (200) to Telegram so it thinks you did not receive the message successfully.

Resources