Skip to content

GramIO API Reference / @gramio/contexts/dist / PassportFile

Class: PassportFile ​

Defined in: contexts/index.d.ts:2667

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.

Constructors ​

Constructor ​

new PassportFile(payload): PassportFile

Defined in: contexts/index.d.ts:2669

Parameters ​

ParameterType
payloadTelegramPassportFile

Returns ​

PassportFile

Properties ​

PropertyTypeDefined in
payloadTelegramPassportFilecontexts/index.d.ts:2668

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

Defined in: contexts/index.d.ts:2671

MDN

Returns ​

string


fileDate ​

Get Signature ​

get fileDate(): number

Defined in: contexts/index.d.ts:2684

Unix time when the file was uploaded

Returns ​

number


fileId ​

Get Signature ​

get fileId(): string

Defined in: contexts/index.d.ts:2675

Identifier for this file, which can be used to download or reuse the file

Returns ​

string


fileSize ​

Get Signature ​

get fileSize(): number

Defined in: contexts/index.d.ts:2682

File size

Returns ​

number


fileUniqueId ​

Get Signature ​

get fileUniqueId(): string

Defined in: contexts/index.d.ts:2680

Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.

Returns ​

string