title: How to get telegram user location
body: <p>I am making a telegram bot api wrapper and was wondering how to get the user's location. I have tried this:</p>
  
  <pre><code>def test(chat):
      reply_markup = {
          "chat_id" : chat,
          "text": "your message",
          "reply_markup":
          {"keyboard":
           [
               [{"text": "Send Your Mobile", "request_contact": True}],
               [{"text": "Send Your Location", "request_location": True}]
           ]
          }
          }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>def func():
      keyboard = [{"text":"Hello", "request_location":True}]
      reply_markup = {"keyboard":keyboard, "one_time_keyboard":True}
      return json.dumps(reply_markup)
  </code></pre>
  
  <p>to make a thing to submit to my send_messages func which I got from: <a href="https://www.codementor.io/garethdwyer/building-a-telegram-bot-using-python-part-1-goi5fncay" rel="nofollow noreferrer">https://www.codementor.io/garethdwyer/building-a-telegram-bot-using-python-part-1-goi5fncay</a></p>
  
  <p>How would I do that?</p>