如何在Telegram或telegram api中使用机器人创建新通道?
我用的是lib 'telegram-mtproto‘。和我在https://core.telegram.org/methods中使用的'channels.createChannel‘方法这里是我的代码
import MTProto from 'telegram-mtproto'
const api = {
layer: 57,
// initConnection: 0x69796de9,
api_id: 1153141
}
const server = {
dev: true //We will connect to the test server.
} //Any empty configurations fields can just not be specified
const client = MTProto({ server, api })
export const connect = async () => {
const result = await client('channels.createChannel', {
title: 'This is title',
about: 'This is description',
address: 't.me/test123456'
})
console.log('TCL: result', result)
}我得到了这个
Error 401 AUTH_KEY_UNREGISTERED 2 2
(node:14408) UnhandledPromiseRejectionWarning: Error: 401 AUTH_KEY_UNREGISTERED CODE#401 AUTH_KEY_UNREGISTERED没有人能帮我解决这个问题或者给我出个主意。非常感谢你。
发布于 2020-08-20 02:01:05
只有用户才能在电报中创建新的群或通道
发布于 2020-10-19 20:26:57
机器人不能创建组/频道。只有用户可以。您可以以用户身份登录来尝试此操作。
https://stackoverflow.com/questions/60087598
复制相似问题