Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.
We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
Values inside $content:
Parameters |
Type |
Required |
Description |
chat_id |
Integer |
Yes |
Unique identifier for the message recipient — User or GroupChat id |
action |
String |
Yes |
Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location data. |
\param $content the request parameters as array
\return the JSON Telegram's reply