Answer the question
In order to leave comments, you need to log in
How to connect a telegram bot with Instagram?
Good day everyone! I have a question.
I created a telegram bot in python, but did not upload it to the server, i.e. it only works when I run it from my computer. I need to link it to an Instagram account so that every post that is published in this account is automatically sent by the bot as a mailing list to people with whom he had a telegram chat. I reviewed a lot of resources, everywhere it is written that in the telegram you need to add a new administrator through the header and then connect it, but as I understand it, this only works for channels in the telegram, not for bots.
Is it possible somehow to do this? If so, is it necessary to upload the bot to the server for this?
Thank you!
Answer the question
In order to leave comments, you need to log in
Get a small database where you will add the IDs of all users with whom your bot has contacted. With the /start command, for example, write the user ID to the database. When necessary, unload all IDs from the database and send messages to them in a loop.
If this is a purely domestic undertaking that does not claim to be a "correct" solution, you can use at least a text file instead of a database. The essence is the same - somewhere a list of all IDs with which the bot has contacted should be stored.
Do the mailing through try, because if the user blocks the bot, sending the message will fall into an error.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question