How to interact with Telegram API

The Telegram API is not as easy to use as a normal HTTP/Rest API, you have to interact with their MTProto protocol. You also have to do all sorts of encryption and decryption. Telegram recently released a new Bot API which abstracts all the complications behind a decent HTTP API. Usage example in NodeJS using

var TelegramBot = require('telegrambot');
var api = new TelegramBot('<YOUR TOKEN HERE>');

api.getUpdates({ offset: 0 }, function (err, updates) {
    // array of message updates since last poll

api.sendMessage({ chat_id: 0, text: 'test' }, function (err, message) {
    // the chat_id is the id received in the getUpdates() call

The token can be generated using their BotFather application. You can also use their deep-linking feature to add a link to your website to initiate a conversation with the bot, like so:

The payload value can be anything you want, like a cache key you might use for validating a real person etc.

I know it doesn't directly answer your question, but from personal experience I found it's better to interact with the Bot API than trying to implement all the intricacies required for the normal API. If you are adamant about using their normal API, the IPs are (test) and (production). They provide the IP details under

If you really want to understand Telegram API development from scratch. My advice would be to follow the steps here

and here

Try to successfully generate an AuthKey.

This exercise will get you familiar with enough of the basics as well as help you build up routines you will need to do further work on Telegram API.

I have outlined the basics for you to get started in this SO post.

Also i think the API documentation online is not so well-written, but following the above step by step while reading the API documentation, for just AuthKey generation, would get you familiar with the language and writing style of the authors of the API

Good Luck.