main.js 509 B

12345678910111213
  1. const { TelegramClient } = require('../gramjs');
  2. const { StringSession } = require('../gramjs').sessions;
  3. (async () => {
  4. console.log('Loading interactive example...')
  5. const sessionName = 'anon'
  6. const apiId = -1 // put your api id here [for example 123456789]
  7. const apiHash = "" // put your api hash here [for example '123456abcfghe']
  8. const client = new TelegramClient(new StringSession(''), apiId, apiHash)
  9. await client.connect()
  10. console.log('You should now be connected.')
  11. })()