--- title: danog\MadelineProto\SecretChats\AuthKeyHandler: Manages secret chats. description: https://core.telegram.org/api/end-to-end --- # `danog\MadelineProto\SecretChats\AuthKeyHandler` [Back to index](../../../index.md) > Author: Daniil Gentili Manages secret chats. https://core.telegram.org/api/end-to-end --- Generated by [danog/phpdoc](https://phpdoc.daniil.it). ## Method list: * `acceptSecretChat(array $params): \Generator` * `requestSecretChat(mixed $user): \Generator` * `rekey(int $chat): \Generator` * `secretChatStatus(int $chat): \int One of MTProto::SECRET_EMPTY, MTProto::SECRET_REQUESTED, MTProto::SECRET_READY` * `getSecretChat(array|int $chat): array` * `hasSecretChat(array|int $chat): bool` * `discardSecretChat(int $chat): \Generator` ## Methods: ### `acceptSecretChat(array $params): \Generator` Accept secret chat. Parameters: * `$params`: `array` Secret chat ID #### See also: * `\Generator` ### `requestSecretChat(mixed $user): \Generator` Request secret chat. Parameters: * `$user`: `mixed` User to start secret chat with #### See also: * `\Generator` ### `rekey(int $chat): \Generator` Rekey secret chat. Parameters: * `$chat`: `int` Secret chat to rekey #### See also: * `\Generator` ### `secretChatStatus(int $chat): \int One of MTProto::SECRET_EMPTY, MTProto::SECRET_REQUESTED, MTProto::SECRET_READY` Get secret chat status. Parameters: * `$chat`: `int` Chat ID Return value: One of MTProto::SECRET_EMPTY, MTProto::SECRET_REQUESTED, MTProto::SECRET_READY ### `getSecretChat(array|int $chat): array` Get secret chat. Parameters: * `$chat`: `array|int` Secret chat ID ### `hasSecretChat(array|int $chat): bool` Check whether secret chat exists. Parameters: * `$chat`: `array|int` Secret chat ID ### `discardSecretChat(int $chat): \Generator` Discard secret chat. Parameters: * `$chat`: `int` Secret chat ID #### See also: * `\Generator`