messages.GetDocumentByHash

class pyrogram.raw.functions.messages.GetDocumentByHash

Get a document by its SHA256 hash, mainly used for gifs

Details:
  • Layer: 223

  • ID: B1F2061F

Parameters:
  • sha256 (bytes) – SHA256 of file

  • size (int 64-bit) – Size of the file in bytes

  • mime_type (str) – Mime type

Returns:

Document

TL Schema

messages.getDocumentByHash#b1f2061f
sha256:bytes
size:long
mime_type:string

= Document

Parameter Tree

GetDocumentByHash
├── sha256bytes
├── sizelong
└── mime_typestring

Example

await app.invoke(
    GetDocumentByHash(
        sha256=b"data",
        size=0,
        mime_type="text",
    )
)