1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-12 21:47:21 +01:00
MadelineProto/old_docs/API_docs_v73/methods/help_getCdnConfig.md

68 lines
1.1 KiB
Markdown
Raw Normal View History

---
title: help.getCdnConfig
2018-03-23 16:23:49 +01:00
description: Get CDN configuration
---
## Method: help.getCdnConfig
[Back to methods index](index.md)
2018-03-23 16:23:49 +01:00
Get CDN configuration
### Return type: [CdnConfig](../types/CdnConfig.md)
### Can bots use this method: **YES**
### Errors this method can return:
| Error | Description |
|----------|---------------|
|Timeout|A timeout occurred while fetching data from the bot|
2018-03-20 19:57:36 +01:00
### 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();
$CdnConfig = $MadelineProto->help->getCdnConfig();
```
2018-03-20 19:57:36 +01:00
### [PWRTelegram HTTP API](https://pwrtelegram.xyz) example (NOT FOR MadelineProto):
### As a bot:
POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline`
Parameters:
* method - help.getCdnConfig
* params - `{}`
### As a user:
POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/help.getCdnConfig`
Parameters:
Or, if you're into Lua:
```
CdnConfig = help.getCdnConfig({})
```