Skip to content

danog\MadelineProto\MyTelegramOrgWrapper: Wrapper for my.telegram.org.

Back to index

Author: Daniil Gentili daniil@daniil.it

Wrapper for my.telegram.org.

Method list:

Methods:

__construct(\danog\MadelineProto\SettingsAbstract $settings)

Constructor.

Parameters:

  • $settings: \danog\MadelineProto\SettingsAbstract

See also:

  • \danog\MadelineProto\SettingsAbstract

getPhoneNumber(): string

Get the phone number used to log in.

login(string $number): void

Login: my.telegram.org sends a login code to the Telegram app of the account.

Parameters:

  • $number: string Phone number

completeLogin(string $password): bool

Complete login.

Parameters:

  • $password: string The login code sent to the Telegram app

loggedIn(): bool

Whether we are logged in.

hasApp(): bool

Check if an app was already created.

getApp(): array{api_id: int, api_hash: string}

Get the currently created app.

createApp(array{app_title: string, app_shortname: string, app_url?: string, app_platform?: string, app_desc?: string} $settings): array{api_id: int, api_hash: string}

Create an app.

Telegram does not allow creating apps from VPS, VPN and other datacenter IP ranges: the request is made
from the IP of the machine running MadelineProto.

Parameters:

  • $settings: array{app_title: string, app_shortname: string, app_url?: string, app_platform?: string, app_desc?: string} App parameters

Generated by danog/phpdoc