skip to Main Content

I use a telegram bot in my site to send messages to channel.
This was working fine but suddenly 2 days ago when I’d send a message ,it returns “chat not found ! “

My published source in host has not changed in 2 month ago but this problem accrued !

Do someone know about this problem ? I live in Iran, is it problem telegram server block Iranian server ?

Using telegram.bot api in c#

3

Answers


  1. Chosen as BEST ANSWER

    I've found answer here in this link :

    How to obtain the chat_id of a private Telegram channel?

    We should use id of channel.

    Send message to this channel through Bot API

    https://api.telegram.org/bot111:222/sendMessage?chat_id=@channelName&text=123 As response you will get info with chat_id of your channel.

    { "ok" : true, "result" : { "chat" : { "id" : -1001005582487, "title" :
      "Test Private Channel", "type" : "channel" }, "date" : 1448245538,
      "message_id" : 7, "text" : "123ds" } }
    

    Now you can convert Channel back to private (by deleting channel's link) and send message directly to this chat_id "-1001005582487"


  2. Check if the id of the channel is right, check if the bot is still admin in the channel and if so check bot’s permissions.

    Login or Signup to reply.
  3. In the new version of bot api, admins of channels have different types of permissions.

    creator of the channel should make sure(in his app) that if the bot has the required permissions. (In this case “can send message”)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search