zerobias / telegram-mtproto

Telegram client api (MTProto) library
MIT License
617 stars 136 forks source link

What is correct format of chat id? #208

Closed kingqi closed 5 years ago

kingqi commented 5 years ago

I saw @goodmind said needs -, but still get this

[2.932] Error 400 CHAT_ID_INVALID 2 5

Here is my code:

    chatId = -1133859255
    client('messages.getFullChat', {
        chat_id: chatId,
    }).then( (result) =>{
        console.log(result);
    }).catch((error) =>{
        console.log(error);
    })

telegram-mtproto version:3.0.6

kingqi commented 5 years ago

My fault, the id is actually channel id