Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13981

pyfork send_photo trouble [400 FILE_REFERENCE_EXPIRED]

$
0
0

Using pyrogram and trying to send photo from getting telegram story from my channel I have following error:

pyrogram.errors.exceptions.bad_request_400.FileReferenceExpired: Telegram says: [400 FILE_REFERENCE_EXPIRED] - The file id contains an expired file reference, you must obtain a valid one by fetching the message from the origin context (caused by "messages.SendMedia")

I understand that the problem is somewhere in the expired link, but I don’t understand whether I should take the brothers from my history object or somewhere else?

app.start()story = app.get_stories("me", 1)if story.photo:                # send to me story link                link_story = app.export_story_link("me", 1)                app.send_message("me", link_story.link)                 # send to me story photo                app.send_photo(chat_id="me", photo=story.photo.file_id)app.stop()

Viewing all articles
Browse latest Browse all 13981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>