Don't have Telegram yet? Try it now!
https://dev.mikamai.com/2015/03/02/oauth2-on-rails-the-client-application/
Oauth2 on Rails: the client application