Telegram error: bot is not a member of the channel

I was practicing the telegram assignment and I am able to fetch the readings from the sensor but while sending alert message I am getting this error


Please guide

Hi @SiddharthBhandarkar,

After creating the bot, you need to add the bot in your channel as administrator.

  1. Open the channel you have created earlier.
  2. Click on the channel name on the top to open the information for the Channel.
  3. Click on the Administrators button
  4. Search for the bot that we have created using the Bot’s username
  5. You will be asked to confirm the rights of the bot.
  6. Tick all the box
  7. Done

Do let me know in case you need further assitance.

I did the same after I created the channel and before starting with the coding still I’m getting the same error

Issue solved with certain changes made in the code. Thankyou for your guidance.

Hi @SiddharthBhandarkar,

Can you share the exact changes that you did in your code ? It will help others also.

While creating the bot for first time I named it Alert Bot where the space between is not expected and same goes with the username ending with the bot. So I deleted the initial bot and created a new bot with the name Alertbot

1 Like