I use Client.Channels_InviteToChannel
but it asks for access_hash
.
How do I suppose to get access_hash
if I never interacted with bot before ?
Note that I’m admin of channel. Also have bot’s token.
I can do that manually using telegram app.
Dim BotFullUser = Await Client.Client.Users_GetFullUser(New InputUser(BotId, 0))
'FAILS HERE
'TL.RpcException: 400 USER_ID_INVALID
Dim BotUser = New InputUser(BotId, BotFullUser.users.ElementAt(0).Value.access_hash)
Dim Ch = "{channel_id}:{channel_hash}".Split(":")
Await Client.Client.Channels_InviteToChannel(New InputChannel(Long.Parse(Ch(0)), Long.Parse(Ch(1))), BotUser)