telegram-s / telegram-api-old

Telegram Api library for java
MIT License
138 stars 64 forks source link

Getting user access_hash #14

Open ghost opened 10 years ago

ghost commented 10 years ago

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

alexkvak commented 10 years ago

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

lkraider commented 9 years ago

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)

alexkvak commented 9 years ago

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

hamidullayev commented 9 years ago

Hi. How i can convert TLAbsUpdates to Dialogs

alexkvak commented 9 years ago

Hi. How i can convert TLAbsUpdates to Dialogs

What dialogs?

Raakh commented 8 years ago

Can you please send me compiled working code to my email ghayel@gmail.com? I shall be grateful to you

Pro-Ton commented 7 years ago

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).

alexpts commented 3 years ago

How get access_hash for supergroup via bot?