title: telegram web app for bots object is not contain user data
body: <p>I have created a web app for my bot and also integrated the telegram &quot;web app Script&quot;</p>
  <p><a href="https://telegram.org/js/telegram-web-app.js" rel="nofollow noreferrer">https://telegram.org/js/telegram-web-app.js</a></p>
  <p>The code of my web app is shown in the below.</p>
  <p>The only data I'm receiving from <em><strong>window.Telegram.WebApp</strong></em> is this :</p>
  <p>using reply Markup keyboard:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;initData&quot;: &quot;&quot;,
    &quot;initDataUnsafe&quot;: {
      
    },
    &quot;version&quot;: &quot;1.0&quot;,
    &quot;colorScheme&quot;: &quot;dark&quot;,
    &quot;themeParams&quot;: {
      &quot;bg_color&quot;: &quot;#17212b&quot;,
      &quot;button_color&quot;: &quot;#5288c1&quot;,
      &quot;button_text_color&quot;: &quot;#ffffff&quot;,
      &quot;hint_color&quot;: &quot;#708499&quot;,
      &quot;link_color&quot;: &quot;#6ab3f3&quot;,
      &quot;text_color&quot;: &quot;#f5f5f5&quot;
    },
    &quot;isExpanded&quot;: true,
    &quot;viewportHeight&quot;: 621,
    &quot;viewportStableHeight&quot;: 621,
    &quot;MainButton&quot;: {
      &quot;text&quot;: &quot;CONTINUE&quot;,
      &quot;color&quot;: &quot;#5288c1&quot;,
      &quot;textColor&quot;: &quot;#ffffff&quot;,
      &quot;isVisible&quot;: false,
      &quot;isProgressVisible&quot;: false,
      &quot;isActive&quot;: true
    }
  }
  </code></pre>
  <p>using inline button :</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;initData&quot;: &quot;query_id=AAFdL6MsAAAAA122voywCSO1y&amp;user=%7B%22id%22%3A748891997%2C%22first_name%22%3A%22%F0%9D%97%A6%F0%9D%97%94%F0%9D%97%A0%F0%9D%97%9C%22%2C%22last_name%22%3A%22%22%2C%22username%22%3A%22samyar%22%2C%22language_code%22%3A%22en%22%7D&amp;auth_date=1651749255&amp;hash=34f3a0de3e0dc7b8d5735d0a85b265763c5c490917180fef40e4df61c819949e&quot;,
    &quot;initDataUnsafe&quot;: {
      &quot;query_id&quot;: &quot;AAFdL6MsAAAAAFbvoywCSO1y&quot;,
      &quot;user&quot;: {
        &quot;id&quot;: 748291957,
        &quot;first_name&quot;: &quot;&quot;,
        &quot;last_name&quot;: &quot;&quot;,
        &quot;username&quot;: &quot;samyar&quot;,
        &quot;language_code&quot;: &quot;en&quot;
      },
      &quot;auth_date&quot;: &quot;1651749255&quot;,
      &quot;hash&quot;: &quot;34f3a0de3e0dc7b8d5735d0a85b265265cdc490917280fef40e4df61c819949e&quot;
    },
    &quot;version&quot;: &quot;1.0&quot;,
    &quot;colorScheme&quot;: &quot;dark&quot;,
    &quot;themeParams&quot;: {
      &quot;bg_color&quot;: &quot;#17212b&quot;,
      &quot;button_color&quot;: &quot;#5288c1&quot;,
      &quot;button_text_color&quot;: &quot;#ffffff&quot;,
      &quot;hint_color&quot;: &quot;#708499&quot;,
      &quot;link_color&quot;: &quot;#6ab3f3&quot;,
      &quot;text_color&quot;: &quot;#f5f5f5&quot;
    },
    &quot;isExpanded&quot;: true,
    &quot;viewportHeight&quot;: 621,
    &quot;viewportStableHeight&quot;: 621,
    &quot;MainButton&quot;: {
      &quot;text&quot;: &quot;CONTINUE&quot;,
      &quot;color&quot;: &quot;#5288c1&quot;,
      &quot;textColor&quot;: &quot;#ffffff&quot;,
      &quot;isVisible&quot;: false,
      &quot;isProgressVisible&quot;: false,
      &quot;isActive&quot;: true
    }
  }
  </code></pre>
  <p>I need to access many other options, but I don't have.i just need the user's profile info.</p>
  <p>The WebApp :</p>
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
    &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot; /&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;
      &lt;script src=&quot;https://telegram.org/js/telegram-web-app.js&quot;&gt;&lt;/script&gt;
      &lt;title&gt;Web app&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div class=&quot;user-info&quot;&gt;
        &lt;!-- Data --&gt;
        &lt;img id=&quot;profile&quot; /&gt;
        &lt;h1 id=&quot;name&quot;&gt;&lt;/h1&gt;
        &lt;h3 id=&quot;username&quot;&gt;&lt;/h3&gt;
        &lt;!--  --&gt;
        &lt;p id=&quot;test&quot;&gt;
          This page is a simple webapp integrated with telegram bot 
        &lt;/p&gt;
      &lt;/div&gt;
      &lt;script&gt;
        const profileEl = document.getElementById(&quot;profile&quot;);
        const nameEl = document.getElementById(&quot;name&quot;);
        const usernameEl = document.getElementById(&quot;username&quot;);
        const test = document.getElementById(&quot;test&quot;);
        window.Telegram.WebApp.ready();
        test.innerText = `${JSON.stringify(window.Telegram.WebApp)}`;
  
        const { first_name, last_name, username, photo_url } =
          window.Telegram.WebAppUser;
  
        // set the profile
        profileEl.src = photo_url;
  
        nameEl.innerText = `${first_name} ${last_name}`;
  
        usernameEl.innerText = username;
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The bot code :
  basically, it's just going to send an replyMarkupKeyboard</p>
  <pre class="lang-py prettyprint-override"><code>
  @app.on_message(filters.private)
  async def hello(client, message):
      # await message.reply(&quot;Just a web app integrated withen telegram! &quot;,
      #                     reply_markup=InlineKeyboardMarkup(
      #             [
      #                 [
      #                     InlineKeyboardButton(
      #                       &quot;Open Web app &quot;,web_app=WebAppInfo(url=&quot;https://telegramwebapp.netlify.app&quot;))
      #                 ]
      #             ]
      #         ))
      await message.reply(&quot;Just a web app integrated withen telegram! &quot;,
                          reply_markup=ReplyKeyboardMarkup(
                  [
                      [
                          KeyboardButton(
                            &quot;Open Web app &quot;,
                            web_app=WebAppInfo(url=&quot;https://telegramwebapp.netlify.app&quot;))
                      ]
                  ]
              ))
  </code></pre>