SlideShare a Scribd company logo
1 of 19
Download to read offline
Telegram inline bot
Oleksandr Stefanovskyi
Agenda
❏ Perks
❏ How to create
❏ Privileges
❏ Examples
What do you need to create bot?
❏ Name
❏ Token
❏ SSL certificate
❏ Server
Interaction with bot
❏ HTTPS Webhooks
❏ HTTP Long Polling
Get updates
❏ api.telegram.org/bot<token>/method
❏ JSON-serialized
❏ Will not be kept longer than 24 hours
{
"ok": true,
"result": []
}
Request
❏ message
❏ audio
❏ text
❏ voice
❏ document
❏ edited_message
❏ inline_query
How to start
❏ getUpdates
❏ sendMessage
❏ ?chat_id=61644769
❏ &text='Hello InterLink'
❏ Maven Central Repository
❏ Jitpack
❏ .jar from GitHub repo
Grab the library
Create your bot
❏ extends TelegramLongPollingBot
❏ getBotUsermane()
❏ getBotToken( )
❏ onUpdateReceived( )
Register bot
❏ Initialize Api Context
❏ Instantiate Telegram Api
❏ Register our Bot
Support methods
❏ URL query string
❏ application/x-www-form-urlencoded
❏ application/json (except for uploading files)
❏ multipart/form-data (use to upload files)
❏ All methods in the Bot API are case-insensitive
❏ All queries must be made using UTF-8
Inline bot perks
❏ It is always with you
❏ Works like a tool
❏ Good old bots
InlineQuery
❏ InlineQuery
❏ AnswerInlineQuey
❏ InlineQueryResult
❏ InlineQueryResultContact
❏ InlineQueryResultGif
❏ InlineQueryResultLocation
❏ InlineQueryResultPhoto
❏ InlineQueryResultVideo
Create inline bot
❏ /setinline
❏ set placeholder
Collecting inline feedback
❏ Statistics of usage
❏ Options users choose
❏ Adjust probability of results
Privacy Mode disabled
All bots, regardless of settings, will receive:
❏ All service messages.
❏ All messages from private chats with users.
❏ All messages from channels where they are a member.
Privacy Mode enabled
Bots with privacy mode enabled will receive:
❏ Commands explicitly meant for them (e.g., /command@this_bot).
❏ General commands from users (e.g. /start) if the bot was the last bot
to send a message to the group.
❏ Messages sent via this bot.
❏ Replies to any messages implicitly or explicitly meant for this bot.
Useful links
❏ https://core.telegram.org/bots
❏ https://core.telegram.org/bots/faq
❏ https://core.telegram.org/bots/api
❏ https://github.com/rubenlagus/TelegramBots
blog.interlink-ua.com
friends@interlink-ua.com
facebook.com/interlinkua
/question

More Related Content

What's hot

JavaScript Tools Overview
JavaScript Tools OverviewJavaScript Tools Overview
JavaScript Tools Overview
Scott Povlot
 

What's hot (12)

Overview of Komodo IDE 10.1
Overview of Komodo IDE 10.1Overview of Komodo IDE 10.1
Overview of Komodo IDE 10.1
 
Easy form creation and validation with Formjack
Easy form creation and validation with FormjackEasy form creation and validation with Formjack
Easy form creation and validation with Formjack
 
JavaScript Tools Overview
JavaScript Tools OverviewJavaScript Tools Overview
JavaScript Tools Overview
 
Chrome Extentions: From HelloWorld to Task note
Chrome Extentions: From HelloWorld to Task noteChrome Extentions: From HelloWorld to Task note
Chrome Extentions: From HelloWorld to Task note
 
Openbar 5 - Leuven - Correctly using js debug tools - Karel Kremer - Craftworkz
Openbar 5 - Leuven - Correctly using js debug tools - Karel Kremer - CraftworkzOpenbar 5 - Leuven - Correctly using js debug tools - Karel Kremer - Craftworkz
Openbar 5 - Leuven - Correctly using js debug tools - Karel Kremer - Craftworkz
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions
 
Chrome extensions
Chrome extensionsChrome extensions
Chrome extensions
 
How to translate your Single Page Application - Webcamp 2016 (en)
How to translate your Single Page Application - Webcamp 2016 (en)How to translate your Single Page Application - Webcamp 2016 (en)
How to translate your Single Page Application - Webcamp 2016 (en)
 
Introduction of chrome extension development
Introduction of chrome extension developmentIntroduction of chrome extension development
Introduction of chrome extension development
 
Zotero Framework Translators
Zotero Framework TranslatorsZotero Framework Translators
Zotero Framework Translators
 
Notepad ++
Notepad ++Notepad ++
Notepad ++
 
Introduction to chrome extension development
Introduction to chrome extension developmentIntroduction to chrome extension development
Introduction to chrome extension development
 

Similar to Telegram bot #2 inline bot

Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
Mark Watson
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?
timbc
 

Similar to Telegram bot #2 inline bot (20)

The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
 
Socket.io
Socket.ioSocket.io
Socket.io
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 
HTTP Basic - PHP
HTTP Basic - PHPHTTP Basic - PHP
HTTP Basic - PHP
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
 
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
 
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
 
Securing REST APIs
Securing REST APIsSecuring REST APIs
Securing REST APIs
 
Http request&response
Http request&responseHttp request&response
Http request&response
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Jetty and Tomcat
Jetty and TomcatJetty and Tomcat
Jetty and Tomcat
 
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutesHow to build a realtime, WebSockets-enabled chat in less than 5 minutes
How to build a realtime, WebSockets-enabled chat in less than 5 minutes
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?
 
WebTalk - Implementing Web Services with a dedicated Java daemon
WebTalk - Implementing Web Services with a dedicated Java daemonWebTalk - Implementing Web Services with a dedicated Java daemon
WebTalk - Implementing Web Services with a dedicated Java daemon
 
httpie
httpiehttpie
httpie
 
JugTAAS ReSTful
JugTAAS ReSTfulJugTAAS ReSTful
JugTAAS ReSTful
 
HTTP 완벽가이드- 13 다이제스트 인증
HTTP 완벽가이드- 13 다이제스트 인증HTTP 완벽가이드- 13 다이제스트 인증
HTTP 완벽가이드- 13 다이제스트 인증
 
How to Build Your First Web App in Go
How to Build Your First Web App in GoHow to Build Your First Web App in Go
How to Build Your First Web App in Go
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 

Telegram bot #2 inline bot