<ahref="/file/811140221/1/fW9vnLya4Fg/e2b5c530c7b0e019c4"target="_blank"><imgsrc="/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305"title="Inline bots. Click for hi-res picture">
</a></div>
<p>Beyond sending commands in private messages or groups, users can interact with your bot via <ahref="/bots/api#inline-mode"><strong>inline queries</strong></a>. If inline queries are enabled, users can call your bot by typing its username and a query in the <strong>text input field</strong> in <strong>any</strong> chat. The query is sent to your bot in an update. This way, people can request content from your bot in <strong>any</strong> of their chats, groups, or channels without sending any messages at all.</p>
<div><center>
<ahref="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458"target="_blank"><imgsrc="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458"title="Users can type the bot’s username in any chat, then type a query without sending any messages"style="width:300px; padding:10px 0px 10px"/></a></center>
<br></div>
<p>To enable this option, send the <code>/setinline</code> command to <ahref="https://telegram.me/botfather">@BotFather</a> and provide the placeholder text that the user will see in the input field after typing your bot’s name.</p>
<blockquote>
<p>See the <ahref="/bots/api#inline-mode">Bot API Manual</a> for the relevant methods and objects.</p>
<p>Inline bots support <strong>all types of content</strong> available in Telegram (20 in all). They are capable of sending stickers, videos, music, locations, documents and more. </p>
<div><center>
<ahref="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229"target="_blank"><imgsrc="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229"title="All kinds of inline content"style="width: 295px; padding: 10px 20px;"/></a></center><br>
</div>
<p>Clients can display the results with vertical or horizontal scrolling, depending on the type of content:</p>
<p>Some inline bots can benefit from an initial setup process, like connecting them to an account on an external service (e.g., YouTube). We've added an easy way of switching between the private chat with a bot and whatever chat the user wants to share inline results in.</p>
<div><center>
<ahref="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12"target="_blank"><imgsrc="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12"title="Switch to PM button"style="width: 295px; padding: 10px 20px;"/></a></center><br>
</div>
<p>You can display a special ‘Switch to PM’ button above the inline results (or instead of them). This button will open a private chat with the bot and pass a parameter of your choosing, so that you can prompt the user for the relevant setup actions. Once done, you can use an inline keyboard with a <ahref="/bots/api#inlinekeyboardmarkup"><em>switch_inline_query</em></a> button to send the user back to the original chat. </p>
<p><strong>Sample bots</strong><br><ahref="https://telegram.me/youtube">@youtube</a>– Shows a ‘Sign in to YouTube’ button, then suggests personalized results.</p>
<blockquote>
<p><ahref="/bots/api#answerinlinequery">Manual: Switch to PM</a></p>
<p>Inline bots can request location data from their users. Use the <code>/setinlinegeo</code> command with <ahref="https://telegram.me/botfather">@BotFather</a> to enable this. Your bot will ask the user for permission to access their location whenever they send an inline request.</p>
<p><strong>Sample bot</strong><br><ahref="https://telegram.me/foursquare">@foursquare</a>– This bot will ask for permission to access the user's location, then provide geo-targeted results.</p>
<p>Messages sent with the help of your bot will show its username next to the sender's name.</p>
<div><center>
<ahref="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace"target="_blank"><imgsrc="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace"title="Gif shared via a bot"style="width: 295px; padding: 0px 20px;"/></a>
<p>When a user taps on the bot username in the message header, the mention is automatically inserted into the input field. Entering the <code>@</code> symbol in the input field brings up a list of suggestions, featuring recently used inline bots.</p>
<p>To know which of the provided results your users are sending to their chat partners, send <ahref="https://telegram.me/botfather">@Botfather</a> the <code>/setinlinefeedback</code> command. With this enabled, you will receive updates on the results chosen by your users.</p>
<p>Please note that this can create load issues for popular bots – you may receive more results than actual requests due to caching (see the <em>cache_time</em> parameter in <ahref="/bots/api#answerinlinequery">answerInlineQuery</a>). For these cases, we recommend adjusting the probability setting to receive 1/10, 1/100 or 1/1000 of the results.</p>
<p>Here are some sample inline bots, in case you’re curious to see one in action. Try any of these:<br><ahref="https://telegram.me/gif">@gif</a>– GIF search<br><ahref="https://telegram.me/vid">@vid</a>– Video search<br><ahref="https://telegram.me/pic">@pic</a>– Yandex image search<br><ahref="https://telegram.me/bing">@bing</a>– Bing image search<br><ahref="https://telegram.me/wiki">@wiki</a>– Wikipedia search<br><ahref="https://telegram.me/imdb">@imdb</a>– IMDB search<br><ahref="https://telegram.me/bold">@bold</a>– Make bold, italic or fixed sys text</p>
<p><strong>NEW</strong><br><ahref="https://telegram.me/youtube">@youtube</a> - Connect your account for personalized results<br><ahref="https://telegram.me/music">@music</a> - Search and send classical music<br><ahref="https://telegram.me/foursquare">@foursquare</a>– Find and send venue addresses<br><ahref="https://telegram.me/sticker">@sticker</a>– Find and send stickers based on emoji</p>
</div>
</div>
</div>
</div>
<divclass="footer_wrap">
<divclass="footer_columns_wrap footer_desktop">
<divclass="footer_column footer_column_telegram">
<h5>Telegram</h5>
<divclass="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.