account.getPrivacy
Get privacy settings of current account
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.account.getPrivacy({
key: new Api.InputPrivacyKey({...}),
}));
console.log(result); // prints the result
})();
TL schema
account.privacyRules#50a04e45 rules:Vector<PrivacyRule> chats:Vector<Chat> users:Vector<User> = account.PrivacyRules;
---functions---
account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
PRIVACY_KEY_INVALID
The privacy key is invalid
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?