So, I will talk now about my experience with Telnyx. There is not too much I can say to introduce this company. Just another one of the top in the market. I know them because one of my customers use to deal with them using their termination trunks.
I will try to tell you what happened with my approach here.
When coding telegram bots, one of the things you will find is that each HTTP query that the system does to your code is independent and sessionless. The Telegram API does not provide a way to remember things; it is up to you to do that.
Why remember? Useful bots are not those where you answer one question and they give you an answer, and then you ask the same question and they give the same answer. Bots have to evolve and remember your last actions; you may want to have a bot that chats with you, it needs to remember your name and so on.
Fortunately for us, PHP has sessions, an easy way to have a memory of what happens. PHP sessions out of the box won't work with Telegram bot; when a browser interacts with a PHP script that uses sessions, the browser uses a cookie to name the session and PHP automatically gets it. In this case, you are attending a headless client that doesn't support the cookies. Here is what I did.
This article assumes knowledge of the Longman PHP Telegram Bot library. Which in my opinion is the best PHP library to write Telegram bots. Also note that this is a short-term memory solution, it is not meant to be long-term.
Lately, I have discovered how powerful is Telegram comparing to other instant messaging platforms. One of the best features it has is the ability of customized bots. Bots can do a lot of things, from giving you hidden account information, weather information, currency exchange information to some more complex things such as e-commerce (you can order a pizza!), specific application interaction and more.
I will be putting here the bots I have been coding with a summary of what they do and any other information.