MadelineProto/docs/TD_docs/methods/index.md
Daniil Gentili 8600a2fcba docufix
2017-09-29 15:50:59 +02:00

50 KiB

title description
Methods List of methods

Methods

Back to API documentation index

$MadelineProto->logout();

$MadelineProto->phone_login($number);

$MadelineProto->complete_phone_login($code);

$MadelineProto->complete_2FA_login($password);

$MadelineProto->bot_login($token);

$MadelineProto->get_dialogs();

$MadelineProto->get_pwr_chat($id);

$MadelineProto->get_info($id);

$MadelineProto->get_full_info($id);

$MadelineProto->get_self();




$MadelineProto->acceptCall(['call_id' => int, 'protocol' => callProtocol, ]) === $Ok




$MadelineProto->addChatMember(['chat_id' => int53, 'user_id' => int, 'forward_limit' => int, ]) === $Ok




$MadelineProto->addChatMembers(['chat_id' => int53, 'user_ids' => [int], ]) === $Ok




$MadelineProto->addNetworkStatistics(['entry' => NetworkStatisticsEntry, ]) === $Ok




$MadelineProto->addRecentSticker(['is_attached' => Bool, 'sticker' => InputFile, ]) === $Stickers




$MadelineProto->addRecentlyFoundChat(['chat_id' => int53, ]) === $Ok




$MadelineProto->addSavedAnimation(['animation' => InputFile, ]) === $Ok




$MadelineProto->addStickerToSet(['user_id' => int, 'name' => string, 'sticker' => inputSticker, ]) === $StickerSet




$MadelineProto->answerCallbackQuery(['callback_query_id' => long, 'text' => string, 'show_alert' => Bool, 'url' => string, 'cache_time' => int, ]) === $Ok




$MadelineProto->answerCustomQuery(['custom_query_id' => long, 'data' => string, ]) === $Ok




$MadelineProto->answerInlineQuery(['inline_query_id' => long, 'is_personal' => Bool, 'results' => [InputInlineQueryResult], 'cache_time' => int, 'next_offset' => string, 'switch_pm_text' => string, 'switch_pm_parameter' => string, ]) === $Ok




$MadelineProto->answerPreCheckoutQuery(['pre_checkout_query_id' => long, 'error_message' => string, ]) === $Ok




$MadelineProto->answerShippingQuery(['shipping_query_id' => long, 'shipping_options' => [shippingOption], 'error_message' => string, ]) === $Ok




$MadelineProto->blockUser(['user_id' => int, ]) === $Ok




$MadelineProto->cancelDownloadFile(['file_id' => int, ]) === $Ok




$MadelineProto->cancelUploadFile(['file_id' => int, ]) === $Ok




$MadelineProto->changeAbout(['about' => string, ]) === $Ok




$MadelineProto->changeAccountTtl(['ttl' => accountTtl, ]) === $Ok




$MadelineProto->changeChannelDescription(['channel_id' => int, 'description' => string, ]) === $Ok




$MadelineProto->changeChannelUsername(['channel_id' => int, 'username' => string, ]) === $Ok




$MadelineProto->changeChatDraftMessage(['chat_id' => int53, 'draft_message' => draftMessage, ]) === $Ok




$MadelineProto->changeChatMemberStatus(['chat_id' => int53, 'user_id' => int, 'status' => ChatMemberStatus, ]) === $Ok




$MadelineProto->changeChatPhoto(['chat_id' => int53, 'photo' => InputFile, ]) === $Ok




$MadelineProto->changeChatReportSpamState(['chat_id' => int53, 'is_spam_chat' => Bool, ]) === $Ok




$MadelineProto->changeChatTitle(['chat_id' => int53, 'title' => string, ]) === $Ok




$MadelineProto->changeName(['first_name' => string, 'last_name' => string, ]) === $Ok




$MadelineProto->changePhoneNumber(['phone_number' => string, 'allow_flash_call' => Bool, 'is_current_phone_number' => Bool, ]) === $AuthState




$MadelineProto->changeStickerSet(['set_id' => long, 'is_installed' => Bool, 'is_archived' => Bool, ]) === $Ok




$MadelineProto->changeUsername(['username' => string, ]) === $Ok




$MadelineProto->checkAuthBotToken(['token' => string, ]) === $AuthState




$MadelineProto->checkAuthCode(['code' => string, 'first_name' => string, 'last_name' => string, ]) === $AuthState




$MadelineProto->checkAuthPassword(['password' => string, ]) === $AuthState




$MadelineProto->checkChangePhoneNumberCode(['code' => string, ]) === $AuthState




$MadelineProto->checkChatInviteLink(['invite_link' => string, ]) === $ChatInviteLinkInfo




$MadelineProto->clearRecentStickers(['is_attached' => Bool, ]) === $Ok




$MadelineProto->closeChat(['chat_id' => int53, ]) === $Ok




$MadelineProto->closeSecretChat(['secret_chat_id' => int, ]) === $Ok




$MadelineProto->createCall(['user_id' => int, 'protocol' => callProtocol, ]) === $CallId




$MadelineProto->createChannelChat(['channel_id' => int, ]) === $Chat




$MadelineProto->createGroupChat(['group_id' => int, ]) === $Chat




$MadelineProto->createNewChannelChat(['title' => string, 'is_supergroup' => Bool, 'description' => string, ]) === $Chat




$MadelineProto->createNewGroupChat(['user_ids' => [int], 'title' => string, ]) === $Chat




$MadelineProto->createNewSecretChat(['user_id' => int, ]) === $Chat




$MadelineProto->createNewStickerSet(['user_id' => int, 'title' => string, 'name' => string, 'is_masks' => Bool, 'stickers' => [inputSticker], ]) === $StickerSet




$MadelineProto->createPrivateChat(['user_id' => int, ]) === $Chat




$MadelineProto->createSecretChat(['secret_chat_id' => int, ]) === $Chat




$MadelineProto->createTemporaryPassword(['password' => string, 'valid_for' => int, ]) === $TemporaryPasswordState




$MadelineProto->debugCall(['call_id' => int, 'debug' => string, ]) === $Ok




$MadelineProto->deleteAccount(['reason' => string, ]) === $Ok




$MadelineProto->deleteChannel(['channel_id' => int, ]) === $Ok




$MadelineProto->deleteChatHistory(['chat_id' => int53, 'remove_from_chat_list' => Bool, ]) === $Ok




$MadelineProto->deleteChatReplyMarkup(['chat_id' => int53, 'message_id' => int53, ]) === $Ok




$MadelineProto->deleteContacts(['user_ids' => [int], ]) === $Ok




$MadelineProto->deleteFile(['file_id' => int, ]) === $Ok




$MadelineProto->deleteMessages(['chat_id' => int53, 'message_ids' => [int53], 'revoke' => Bool, ]) === $Ok




$MadelineProto->deleteMessagesFromUser(['chat_id' => int53, 'user_id' => int, ]) === $Ok




$MadelineProto->deleteProfilePhoto(['profile_photo_id' => long, ]) === $Ok




$MadelineProto->deleteRecentHashtag(['hashtag' => string, ]) === $Ok




$MadelineProto->deleteRecentSticker(['is_attached' => Bool, 'sticker' => InputFile, ]) === $Ok




$MadelineProto->deleteRecentlyFoundChat(['chat_id' => int53, ]) === $Ok




$MadelineProto->deleteRecentlyFoundChats([]) === $Ok




$MadelineProto->deleteSavedAnimation(['animation' => InputFile, ]) === $Ok




$MadelineProto->deleteSavedCredentials([]) === $Ok




$MadelineProto->deleteSavedOrderInfo([]) === $Ok




$MadelineProto->deleteStickerFromSet(['sticker' => InputFile, ]) === $Ok




$MadelineProto->deleteTopChat(['category' => TopChatCategory, 'chat_id' => int53, ]) === $Ok




$MadelineProto->discardCall(['call_id' => int, 'is_disconnected' => Bool, 'duration' => int, 'connection_id' => long, ]) === $Ok




$MadelineProto->downloadFile(['file_id' => int, 'priority' => int, ]) === $Ok




$MadelineProto->editInlineMessageCaption(['inline_message_id' => string, 'reply_markup' => ReplyMarkup, 'caption' => string, ]) === $Ok




$MadelineProto->editInlineMessageReplyMarkup(['inline_message_id' => string, 'reply_markup' => ReplyMarkup, ]) === $Ok




$MadelineProto->editInlineMessageText(['inline_message_id' => string, 'reply_markup' => ReplyMarkup, 'input_message_content' => InputMessageContent, ]) === $Ok




$MadelineProto->editMessageCaption(['chat_id' => int53, 'message_id' => int53, 'reply_markup' => ReplyMarkup, 'caption' => string, ]) === $Message




$MadelineProto->editMessageReplyMarkup(['chat_id' => int53, 'message_id' => int53, 'reply_markup' => ReplyMarkup, ]) === $Message




$MadelineProto->editMessageText(['chat_id' => int53, 'message_id' => int53, 'reply_markup' => ReplyMarkup, 'input_message_content' => InputMessageContent, ]) === $Message




$MadelineProto->exportChatInviteLink(['chat_id' => int53, ]) === $ChatInviteLink




$MadelineProto->finishFileGeneration(['generation_id' => long, ]) === $Ok




$MadelineProto->forwardMessages(['chat_id' => int53, 'from_chat_id' => int53, 'message_ids' => [int53], 'disable_notification' => Bool, 'from_background' => Bool, ]) === $Messages




$MadelineProto->getAccountTtl([]) === $AccountTtl




$MadelineProto->getActiveSessions([]) === $Sessions




$MadelineProto->getArchivedStickerSets(['is_masks' => Bool, 'offset_sticker_set_id' => long, 'limit' => int, ]) === $StickerSets




$MadelineProto->getAttachedStickerSets(['file_id' => int, ]) === $StickerSets




$MadelineProto->getAuthState([]) === $AuthState




$MadelineProto->getBlockedUsers(['offset' => int, 'limit' => int, ]) === $Users




$MadelineProto->getCallbackQueryAnswer(['chat_id' => int53, 'message_id' => int53, 'payload' => CallbackQueryPayload, ]) === $CallbackQueryAnswer




$MadelineProto->getChannel(['channel_id' => int, ]) === $Channel




$MadelineProto->getChannelFull(['channel_id' => int, ]) === $ChannelFull




$MadelineProto->getChannelMembers(['channel_id' => int, 'filter' => ChannelMembersFilter, 'offset' => int, 'limit' => int, ]) === $ChatMembers




$MadelineProto->getChat(['chat_id' => int53, ]) === $Chat




$MadelineProto->getChatEventLog(['chat_id' => int53, 'query' => string, 'from_event_id' => long, 'limit' => int, 'filters' => chatEventLogFilters, 'user_ids' => [int], ]) === $ChatEvents




$MadelineProto->getChatHistory(['chat_id' => int53, 'from_message_id' => int53, 'offset' => int, 'limit' => int, 'only_local' => Bool, ]) === $Messages




$MadelineProto->getChatMember(['chat_id' => int53, 'user_id' => int, ]) === $ChatMember




$MadelineProto->getChatReportSpamState(['chat_id' => int53, ]) === $ChatReportSpamState




$MadelineProto->getChats(['offset_order' => long, 'offset_chat_id' => int53, 'limit' => int, ]) === $Chats




$MadelineProto->getCommonChats(['user_id' => int, 'offset_chat_id' => int53, 'limit' => int, ]) === $Chats




$MadelineProto->getCreatedPublicChats([]) === $Chats




$MadelineProto->getFile(['file_id' => int, ]) === $File




$MadelineProto->getFilePersistent(['persistent_file_id' => string, 'file_type' => FileType, ]) === $File




$MadelineProto->getGameHighScores(['chat_id' => int53, 'message_id' => int53, 'user_id' => int, ]) === $GameHighScores




$MadelineProto->getGroup(['group_id' => int, ]) === $Group




$MadelineProto->getGroupFull(['group_id' => int, ]) === $GroupFull




$MadelineProto->getInlineGameHighScores(['inline_message_id' => string, 'user_id' => int, ]) === $GameHighScores




$MadelineProto->getInlineQueryResults(['bot_user_id' => int, 'chat_id' => int53, 'user_location' => location, 'query' => string, 'offset' => string, ]) === $InlineQueryResults




$MadelineProto->getInstalledStickerSets(['is_masks' => Bool, ]) === $StickerSets




$MadelineProto->getInviteText([]) === $Text




$MadelineProto->getMe([]) === $User




$MadelineProto->getMessage(['chat_id' => int53, 'message_id' => int53, ]) === $Message




$MadelineProto->getMessages(['chat_id' => int53, 'message_ids' => [int53], ]) === $Messages




$MadelineProto->getNetworkStatistics(['only_current' => Bool, ]) === $NetworkStatistics




$MadelineProto->getNotificationSettings(['scope' => NotificationSettingsScope, ]) === $NotificationSettings




$MadelineProto->getOption(['name' => string, ]) === $OptionValue




$MadelineProto->getPasswordState([]) === $PasswordState




$MadelineProto->getPaymentForm(['chat_id' => int53, 'message_id' => int53, ]) === $PaymentForm




$MadelineProto->getPaymentReceipt(['chat_id' => int53, 'message_id' => int53, ]) === $PaymentReceipt




$MadelineProto->getPrivacy(['key' => PrivacyKey, ]) === $PrivacyRules




$MadelineProto->getProxy([]) === $Proxy




$MadelineProto->getPublicMessageLink(['chat_id' => int53, 'message_id' => int53, ]) === $PublicMessageLink




$MadelineProto->getRecentInlineBots([]) === $Users




$MadelineProto->getRecentStickers(['is_attached' => Bool, ]) === $Stickers




$MadelineProto->getRecoveryEmail(['password' => string, ]) === $RecoveryEmail




$MadelineProto->getSavedAnimations([]) === $Animations




$MadelineProto->getSavedOrderInfo([]) === $OrderInfo




$MadelineProto->getSecretChat(['secret_chat_id' => int, ]) === $SecretChat




$MadelineProto->getStickerEmojis(['sticker' => InputFile, ]) === $StickerEmojis




$MadelineProto->getStickerSet(['set_id' => long, ]) === $StickerSet




$MadelineProto->getStickers(['emoji' => string, 'limit' => int, ]) === $Stickers




$MadelineProto->getStorageStatistics(['chat_limit' => int, ]) === $StorageStatistics




$MadelineProto->getStorageStatisticsFast([]) === $StorageStatisticsFast




$MadelineProto->getSupportUser([]) === $User




$MadelineProto->getTemporaryPasswordState([]) === $TemporaryPasswordState




$MadelineProto->getTermsOfService([]) === $Text




$MadelineProto->getTopChats(['category' => TopChatCategory, 'limit' => int, ]) === $Chats




$MadelineProto->getTrendingStickerSets([]) === $StickerSets




$MadelineProto->getUser(['user_id' => int, ]) === $User




$MadelineProto->getUserFull(['user_id' => int, ]) === $UserFull




$MadelineProto->getUserProfilePhotos(['user_id' => int, 'offset' => int, 'limit' => int, ]) === $UserProfilePhotos




$MadelineProto->getWallpapers([]) === $Wallpapers




$MadelineProto->getWebPageInstantView(['url' => string, 'force_full' => Bool, ]) === $WebPageInstantView




$MadelineProto->getWebPagePreview(['message_text' => string, ]) === $WebPage




$MadelineProto->importChatInviteLink(['invite_link' => string, ]) === $Ok




$MadelineProto->importContacts(['contacts' => [contact], ]) === $ImportedContacts




$MadelineProto->migrateGroupChatToChannelChat(['chat_id' => int53, ]) === $Chat




$MadelineProto->openChat(['chat_id' => int53, ]) === $Ok




$MadelineProto->openMessageContent(['chat_id' => int53, 'message_id' => int53, ]) === $Ok




$MadelineProto->optimizeStorage(['size' => int53, 'ttl' => int, 'count' => int, 'immunity_delay' => int, 'file_types' => [FileType], 'chat_ids' => [int53], 'exclude_chat_ids' => [int53], 'chat_limit' => int, ]) === $StorageStatistics




$MadelineProto->pinChannelMessage(['channel_id' => int, 'message_id' => int53, 'disable_notification' => Bool, ]) === $Ok




$MadelineProto->processDcUpdate(['dc' => string, 'addr' => string, ]) === $Ok




$MadelineProto->rateCall(['call_id' => int, 'rating' => int, 'comment' => string, ]) === $Ok




$MadelineProto->recoverAuthPassword(['recovery_code' => string, ]) === $AuthState




$MadelineProto->recoverPassword(['recovery_code' => string, ]) === $PasswordState




$MadelineProto->registerDevice(['device_token' => DeviceToken, ]) === $Ok




$MadelineProto->reorderInstalledStickerSets(['is_masks' => Bool, 'sticker_set_ids' => [long], ]) === $Ok




$MadelineProto->reportChannelSpam(['channel_id' => int, 'user_id' => int, 'message_ids' => [int53], ]) === $Ok




$MadelineProto->reportChat(['chat_id' => int53, 'reason' => ChatReportReason, ]) === $Ok




$MadelineProto->requestAuthPasswordRecovery([]) === $AuthState




$MadelineProto->requestPasswordRecovery([]) === $PasswordRecoveryInfo




$MadelineProto->resendAuthCode([]) === $AuthState




$MadelineProto->resendChangePhoneNumberCode([]) === $AuthState




$MadelineProto->resetAllNotificationSettings([]) === $Ok




$MadelineProto->resetAuth(['force' => Bool, ]) === $AuthState




$MadelineProto->resetNetworkStatistics([]) === $Ok




$MadelineProto->searchCallMessages(['from_message_id' => int53, 'limit' => int, 'only_missed' => Bool, ]) === $Messages




$MadelineProto->searchChatMembers(['chat_id' => int53, 'query' => string, 'limit' => int, ]) === $ChatMembers




$MadelineProto->searchChatMessages(['chat_id' => int53, 'query' => string, 'sender_user_id' => int, 'from_message_id' => int53, 'limit' => int, 'filter' => SearchMessagesFilter, ]) === $Messages




$MadelineProto->searchChats(['query' => string, 'limit' => int, ]) === $Chats




$MadelineProto->searchContacts(['query' => string, 'limit' => int, ]) === $Users




$MadelineProto->searchHashtags(['prefix' => string, 'limit' => int, ]) === $Hashtags




$MadelineProto->searchMessages(['query' => string, 'offset_date' => int, 'offset_chat_id' => int53, 'offset_message_id' => int53, 'limit' => int, ]) === $Messages




$MadelineProto->searchPublicChat(['username' => string, ]) === $Chat




$MadelineProto->searchPublicChats(['username_prefix' => string, ]) === $Chats




$MadelineProto->searchSecretMessages(['chat_id' => int53, 'query' => string, 'from_search_id' => long, 'limit' => int, 'filter' => SearchMessagesFilter, ]) === $FoundMessages




$MadelineProto->searchStickerSet(['name' => string, ]) === $StickerSet




$MadelineProto->sendBotStartMessage(['bot_user_id' => int, 'chat_id' => int53, 'parameter' => string, ]) === $Message




$MadelineProto->sendChatAction(['chat_id' => int53, 'action' => ChatAction, ]) === $Ok




$MadelineProto->sendChatScreenshotTakenNotification(['chat_id' => int53, ]) === $Ok




$MadelineProto->sendChatSetTtlMessage(['chat_id' => int53, 'ttl' => int, ]) === $Message




$MadelineProto->sendCustomRequest(['method' => string, 'parameters' => string, ]) === $CustomRequestResult




$MadelineProto->sendInlineQueryResultMessage(['chat_id' => int53, 'reply_to_message_id' => int53, 'disable_notification' => Bool, 'from_background' => Bool, 'query_id' => long, 'result_id' => string, ]) === $Message




$MadelineProto->sendMessage(['chat_id' => int53, 'reply_to_message_id' => int53, 'disable_notification' => Bool, 'from_background' => Bool, 'reply_markup' => ReplyMarkup, 'input_message_content' => InputMessageContent, ]) === $Message




$MadelineProto->sendPaymentForm(['chat_id' => int53, 'message_id' => int53, 'order_info_id' => string, 'shipping_option_id' => string, 'credentials' => InputCredentials, ]) === $PaymentResult




$MadelineProto->setAlarm(['seconds' => double, ]) === $Ok




$MadelineProto->setAuthPhoneNumber(['phone_number' => string, 'allow_flash_call' => Bool, 'is_current_phone_number' => Bool, ]) === $AuthState




$MadelineProto->setBotUpdatesStatus(['pending_update_count' => int, 'error_message' => string, ]) === $Ok




$MadelineProto->setChatClientData(['chat_id' => int53, 'client_data' => string, ]) === $Ok




$MadelineProto->setFileGenerationProgress(['generation_id' => long, 'size' => int, 'local_size' => int, ]) === $Ok




$MadelineProto->setGameScore(['chat_id' => int53, 'message_id' => int53, 'edit_message' => Bool, 'user_id' => int, 'score' => int, 'force' => Bool, ]) === $Message




$MadelineProto->setInlineGameScore(['inline_message_id' => string, 'edit_message' => Bool, 'user_id' => int, 'score' => int, 'force' => Bool, ]) === $Ok




$MadelineProto->setNetworkType(['type' => NetworkType, ]) === $Ok




$MadelineProto->setNotificationSettings(['scope' => NotificationSettingsScope, 'notification_settings' => notificationSettings, ]) === $Ok




$MadelineProto->setOption(['name' => string, 'value' => OptionValue, ]) === $Ok




$MadelineProto->setPassword(['old_password' => string, 'new_password' => string, 'new_hint' => string, 'set_recovery_email' => Bool, 'new_recovery_email' => string, ]) === $PasswordState




$MadelineProto->setPinnedChats(['chat_ids' => [int53], ]) === $Ok




$MadelineProto->setPrivacy(['key' => PrivacyKey, 'rules' => privacyRules, ]) === $Ok




$MadelineProto->setProfilePhoto(['photo' => InputFile, ]) === $Ok




$MadelineProto->setProxy(['proxy' => Proxy, ]) === $Ok




$MadelineProto->setRecoveryEmail(['password' => string, 'new_recovery_email' => string, ]) === $PasswordState




$MadelineProto->setStickerPositionInSet(['sticker' => InputFile, 'position' => int, ]) === $Ok




$MadelineProto->terminateAllOtherSessions([]) === $Ok




$MadelineProto->terminateSession(['session_id' => long, ]) === $Ok




$MadelineProto->testCallBytes(['x' => bytes, ]) === $TestBytes




$MadelineProto->testCallEmpty([]) === $Ok




$MadelineProto->testCallString(['x' => string, ]) === $TestString




$MadelineProto->testCallVectorInt(['x' => [int], ]) === $TestVectorInt




$MadelineProto->testCallVectorIntObject(['x' => [testInt], ]) === $TestVectorIntObject




$MadelineProto->testCallVectorString(['x' => [string], ]) === $TestVectorString




$MadelineProto->testCallVectorStringObject(['x' => [testString], ]) === $TestVectorStringObject




$MadelineProto->testGetDifference([]) === $Ok




$MadelineProto->testNetwork([]) === $Ok




$MadelineProto->testSquareInt(['x' => int, ]) === $TestInt




$MadelineProto->testUseError([]) === $Error




$MadelineProto->testUseUpdate([]) === $Update




$MadelineProto->toggleChannelInvites(['channel_id' => int, 'anyone_can_invite' => Bool, ]) === $Ok




$MadelineProto->toggleChannelSignMessages(['channel_id' => int, 'sign_messages' => Bool, ]) === $Ok




$MadelineProto->toggleChatIsPinned(['chat_id' => int53, 'is_pinned' => Bool, ]) === $Ok




$MadelineProto->toggleGroupAdministrators(['group_id' => int, 'everyone_is_administrator' => Bool, ]) === $Ok




$MadelineProto->unblockUser(['user_id' => int, ]) === $Ok




$MadelineProto->unpinChannelMessage(['channel_id' => int, ]) === $Ok




$MadelineProto->uploadFile(['file' => InputFile, 'file_type' => FileType, 'priority' => int, ]) === $File




$MadelineProto->uploadStickerFile(['user_id' => int, 'png_sticker' => InputFile, ]) === $File




$MadelineProto->validateOrderInfo(['chat_id' => int53, 'message_id' => int53, 'order_info' => orderInfo, 'allow_save' => Bool, ]) === $ValidatedOrderInfo




$MadelineProto->viewMessages(['chat_id' => int53, 'message_ids' => [int53], ]) === $Ok




$MadelineProto->viewTrendingStickerSets(['sticker_set_ids' => [long], ]) === $Ok