messages.getStatsURL
Returns URL with the chat statistics. Currently this method can be used only for channels
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.messages.getStatsURL({
dark: true,
peer: new Api.InputPeer({...}),
params: 'random string here',
}));
console.log(result); // prints the result
})();
TL schema
statsURL#47a971e0 url:string = StatsURL;
---functions---
messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
Parameters
Result
Possible errors
Code
Type
Description
400
PEER_ID_INVALID
The provided peer id is invalid
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?