'error with InviteToChannelRequest (telethon)

I'm trying to invite people to my channel using telethon (InviteToChannelRequest)

api_id = 12345
api_hash = '123abc123'
client = TelegramClient('test1', api_id, api_hash)
client.start()

client(InviteToChannelRequest(
    -100********,
    ['87654321']
))

i using @getmyid_bot to find id of my channel: Forwarded from chat: -100******** and i have an error:

ValueError: Could not find the input entity for PeerUser(user_id=100********) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source