telegram-api icon indicating copy to clipboard operation
telegram-api copied to clipboard

Getting user access_hash

Open ghost opened this issue 10 years ago • 8 comments

Hi

I'm developing some customer service bot. People send Telegram messages to the service and the service needs to auto reply. But these people are not in the contact list of the service so I need to use TLInputPeerForeign to send a message to them. On receiving a message I can see the user_id but not the access_hash. How can I get the access_hash of a user?

Thx

ghost avatar Apr 28 '14 08:04 ghost

You should use https://core.telegram.org/method/messages.getDialogs method. It returns you users list 2014-09-05 17 41 28

alexkvak avatar Sep 05 '14 13:09 alexkvak

Related: How would I get the user access_hash for a UserForeign request if I have just the user_id and no message? (say I want to start a chat with a user not in contact list)

lkraider avatar Nov 06 '14 22:11 lkraider

You cannot start chat with user not from contact list. You should add it to contact list first.

alexkvak avatar Nov 09 '14 08:11 alexkvak

Hi. How i can convert TLAbsUpdates to Dialogs

hamidullayev avatar Apr 12 '15 11:04 hamidullayev

Hi. How i can convert TLAbsUpdates to Dialogs

What dialogs?

alexkvak avatar Apr 13 '15 07:04 alexkvak

Can you please send me compiled working code to my email [email protected]? I shall be grateful to you

Raakh avatar Sep 19 '15 19:09 Raakh

Hi, How can we get channels messages without joining it (and so it wouldn't be added to the user's Dialogs)? It's possible in the telegrams' apps, when you click on a channels username any where (@channel_user).

Pro-Ton avatar Nov 09 '16 16:11 Pro-Ton

How get access_hash for supergroup via bot?

alexpts avatar Mar 31 '21 06:03 alexpts