Take a close look at what Webogram does. It is mainly written in javascript.
Then see if you can follow the steps here to:
1) get your APP_ID
2) write your code to obtain a valid Auth_key as indicated in the telegram API
see here: https://stackoverflow.com/a/32809138/44080
3) check out the console.logs from a local copy of Webogram running in your browser to understand how a working client interacts with telegram servers.
4) build your parser to handle encoding and decoding of Telegrams TL types. You will need this handle messaging with the telegram servers.
5) study the MtProto encryption requirements, read and implement each step carefully, compare with what webogram logs are telling you, as well as what webogram mtProto.js is doing
That's one way to get started
cheers.