Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. from telethon.tl.functions.contacts import GetContactsRequest
  2. from telethon.tl.types.contacts import Contacts
  3. from telethon import *
  4.  
  5. api_id = 1xxxx43
  6. api_hash = '1429acxxxxxxxxxxxxxxba8f5d7ba0'
  7. phone = '97250xxxx674'
  8.  
  9. client = TelegramClient('@Session1', api_id, api_hash)
  10. client.connect()
  11.  
  12. if not client.is_user_authorized():
  13.     client.send_code_request(phone)
  14.     client.sign_in(phone, input('Enter the code (+phone_number): '))
  15.  
  16. gil_phone="+972523xxx0"
  17. result = client.get_entity(phone)
  18. print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement