Oct-22-2020, 12:23 PM
(This post was last modified: Oct-22-2020, 12:23 PM by KanseiDorifto.)
Hi,
i am approaching python development with telegram API and I am facing a problem.
I have two parts on my app, a python telegram bot (python-telegram-bot API) and a php webapp that it's needed to authenticate users before let them use the telegram bot handlers.
The php app makes a call to the telegram bot using the SendMessage api command like following:
https://api.telegram.org/botToken/SendMessage
in the message I send I have stored chat_id, text and a response code (one time password) that I need the telegram bot to read and store in a variable for further check.
With this setup my php app sends the message to the python bot and I got the notification on telegram, but what I want to do, is to extract the data from the telegram api call and save them in variables, especially I want to save the response code (OTP) i put in the api call in the first place..
How can I do that inside my python telegram bot?
Hope you can help me
i am approaching python development with telegram API and I am facing a problem.
I have two parts on my app, a python telegram bot (python-telegram-bot API) and a php webapp that it's needed to authenticate users before let them use the telegram bot handlers.
The php app makes a call to the telegram bot using the SendMessage api command like following:
https://api.telegram.org/botToken/SendMessage
Quote:$params=[ 'chat_id'=>$chatID, 'text'=>'text to send here..', 'response'=> $oneTimePassword ]
in the message I send I have stored chat_id, text and a response code (one time password) that I need the telegram bot to read and store in a variable for further check.
With this setup my php app sends the message to the python bot and I got the notification on telegram, but what I want to do, is to extract the data from the telegram api call and save them in variables, especially I want to save the response code (OTP) i put in the api call in the first place..
How can I do that inside my python telegram bot?
Hope you can help me