initConnection #

Initialize connection

Layer 223

---functions---
initConnection#c1cd5ea9 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy params:flags.1?JSONValue query:!X = X;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
api_idintApplication identifier (see. App configuration)
device_modelstringDevice model
system_versionstringOperation system version
app_versionstringApplication version
system_lang_codestringCode for the language used on the device's OS, ISO 639-1 standard
lang_packstringPlatform identifier (i.e. android, tdesktop, etc).
lang_codestringEither an ISO 639-1 language code or a language pack name obtained from a language pack link.
proxyflags.0?InputClientProxyInfo about an MTProto proxy
paramsflags.1?JSONValueAdditional initConnection parameters.
For now, only the tz_offset field is supported, for specifying the timezone offset in seconds.
query!XThe query itself

Result #

Returns the type returned by the invoked method.

Both users and bots can use this method #

This method can be invoked over an unauthenticated connection » #

Possible errors #

CodeTypeDescription
400CONNECTION_LAYER_INVALIDLayer invalid.

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.