# #02 Telegram API - Create Bot, use API, gem HTTParty

- URL: https://superails.com/posts/ruby-on-rails-02-telegram-api-create-bot-use-api-gem-httparty
- Published: 2021-03-16
- Duration: 28:09
- Access: free
- Playlists: Telegram API

Github repo: 
https://github.com/corsego/02-03-04-telegrails
Useful resources:
https://web.telegram.org/
https://github.com/jnunemaker/httparty
Heroku demo: 
http://telegrails.herokuapp.com/

0:00 Intro
1:37 Create Bot
03:54 API - get bot ID
05:02 API - get user ID, messages
07:01 create group, get group ID
8:14 API - send message
10:32 - Rails link to API request
14:22 - HTTParty, API request via controller
20:41 - set global TELEGRAM api key
25:39 - improve HTTParty method

## Chapters

- 0:00 Intro
- 1:37 Create Bot
- 03:54 API - get bot ID
- 05:02 API - get user ID, messages
- 07:01 create group, get group ID
- 8:14 API - send message
- 10:32 - Rails link to API request
- 14:22 - HTTParty, API request via controller
- 20:41 - set global TELEGRAM api key
- 25:39 - improve HTTParty method
