help.getConfig

Returns current configuration, including data center configuration.

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.help.getConfig({
        400: new Api.CONNECTION_API_ID_INVALID({...}),
        400: new Api.CONNECTION_APP_VERSION_EMPTY({...}),
        400: new Api.CONNECTION_DEVICE_MODEL_EMPTY({...}),
        400: new Api.CONNECTION_LANG_PACK_INVALID({...}),
        400: new Api.CONNECTION_LAYER_INVALID({...}),
        400: new Api.CONNECTION_NOT_INITED({...}),
        400: new Api.CONNECTION_SYSTEM_EMPTY({...}),
        400: new Api.CONNECTION_SYSTEM_LANG_CODE_EMPTY({...}),
        400: new Api.DATA_INVALID({...}),
        400: new Api.INPUT_LAYER_INVALID({...}),
        400: new Api.MSG_ID_INVALID({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

Parameters

Name

Type

Description

400

CONNECTION_API_ID_INVALID

The provided API id is invalid

400

CONNECTION_APP_VERSION_EMPTY

App version is empty

400

CONNECTION_DEVICE_MODEL_EMPTY

Device model empty

400

CONNECTION_LANG_PACK_INVALID

Language pack invalid

400

CONNECTION_LAYER_INVALID

Layer invalid

400

CONNECTION_NOT_INITED

Connection not initialized

400

CONNECTION_SYSTEM_EMPTY

Connection system empty

400

CONNECTION_SYSTEM_LANG_CODE_EMPTY

The system_lang_code field is empty

400

DATA_INVALID

Encrypted data invalid

400

INPUT_LAYER_INVALID

The provided layer is invalid

400

MSG_ID_INVALID

Invalid message ID provided

Result

Config

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated

Was this helpful?