Acquiring access_hash for Input Types
See original GitHub issueI see multiple examples for sending messages/files…etc that instantiate a new Input Type, for example InputChannel
or InputPeer
…etc. Here’s an example for SendMessage
It seems like most Input types take an access_hash
, yet I can’t find anything in gramjs or from Telegram on how exactly to get an access_hash
other than results from different libraries like Telethon.
Do you have any examples or pointers on how I get an access_hash
for a private channel that my user is already invited to? Can I do this with built in functionality from GramJS or do I need to use API Methods? Any pointers appreciated, and thanks for the work on this project, it’s extremely helpful for what I’m working on.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Users, Chats and Channels — Telethon 1.7.7 documentation
Entities' ID are the same for all user and bot accounts, however, the access hash is different for each account, so trying to...
Read more >Entities — Telethon 1.26.1 documentation
Input Entities; Full Entities; Accessing Entities; Summary ... entities: usernames, phone numbers, chat links, invite links, IDs, and the types themselves.
Read more >Access Hash value when key is a number with undescore (1_1)
JS engine is disposing of the underscore and converting the key from 1_1 to 11 . But if you wrap it in quotes,...
Read more >Telethon Documentation - Read the Docs
trying to reuse the access hash from one account in another will not work. Sometimes, Telegram only needs to indicate the type of...
Read more >Adding Telegram Group Members to Your Groups Using ...
Go to 'API development tools' and fill out the form. ... Note: You need to cast the user id and access hash to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
you can just pass an ID. if channel/superroup => add -100 if group add => - if user don’t add anything for example for your test group2 it would be
client.sendMessage(-463172658,{params})
https://core.telegram.org/constructor/inputPeerChat doesn’t require an accessHash
@painor ok thank you. I was under the false assumption that what I had were groups, not chats. Makes sense that I can use
inputPeerChat
without anaccessHash
. Appreciate the clarification, and thank you so much for being responsive. Much appreciated