<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>
<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>
<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>
<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>
<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>
<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>
<ahref="https://telegram.me/youtube">@youtube</a>–Shows a 'Sign in to YouTube' button, then suggests personalized results.</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>
<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>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>