--- title: danog\MadelineProto\MTProto\PermAuthKey: MTProto permanent auth key. description: --- # `danog\MadelineProto\MTProto\PermAuthKey` [Back to index](../../../index.md) > Author: Daniil Gentili MTProto permanent auth key. ## Method list: * `isAuthorized(): bool` * `authorized(bool $authorized): void` * `jsonSerialize(): array` * `setAuthKey(string $authKey): void` * `hasAuthKey(): bool` * `getAuthKey(): string` * `getID(): string` * `setServerSalt(string $salt): void` * `getServerSalt(): string` * `hasServerSalt(): bool` ## Methods: ### `isAuthorized(): bool` Check if we are logged in. ### `authorized(bool $authorized): void` Set the authorized boolean. Parameters: * `$authorized`: `bool` Whether we are authorized ### `jsonSerialize(): array` JSON serialization function. ### `setAuthKey(string $authKey): void` Set auth key. Parameters: * `$authKey`: `string` Authorization key ### `hasAuthKey(): bool` Check if auth key is present. ### `getAuthKey(): string` Get auth key. ### `getID(): string` Get auth key ID. ### `setServerSalt(string $salt): void` Set server salt. Parameters: * `$salt`: `string` Server salt ### `getServerSalt(): string` Get server salt. ### `hasServerSalt(): bool` Check if has server salt. --- Generated by [danog/phpdoc](https://phpdoc.daniil.it)