MadelineProtoDocs/old_docs/API_docs_v72/methods/destroy_auth_key.md

61 lines
1016 B
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
2018-04-01 13:24:46 +02:00
title: destroy_auth_key
description: Destroy current authorization key
2018-04-01 13:19:25 +02:00
---
2018-04-01 13:24:46 +02:00
## Method: destroy\_auth\_key
2018-04-01 13:19:25 +02:00
[Back to methods index](index.md)
2018-04-01 13:24:46 +02:00
Destroy current authorization key
2018-04-01 13:19:25 +02:00
2018-04-01 13:24:46 +02:00
### Return type: [DestroyAuthKeyRes](../types/DestroyAuthKeyRes.md)
2018-04-01 13:19:25 +02:00
### Can bots use this method: **YES**
### MadelineProto Example:
```
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
2018-04-01 13:24:46 +02:00
$DestroyAuthKeyRes = $MadelineProto->destroy_auth_key();
2018-04-01 13:19:25 +02:00
```
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
2018-04-01 13:24:46 +02:00
* method - destroy_auth_key
2018-04-01 13:19:25 +02:00
* params - `{}`
### As a user:
2018-04-01 13:24:46 +02:00
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/destroy_auth_key`
2018-04-01 13:19:25 +02:00
Parameters:
Or, if you're into Lua:
```
2018-04-01 13:24:46 +02:00
DestroyAuthKeyRes = destroy_auth_key({})
2018-04-01 13:19:25 +02:00
```