Get Chat Id of Telegram user

The first step is to get the API token for you bot. See this guide on how to do this.

Next, navigate the following URL, replacing YOUR_BOT_API_TOKEN with the token retrieved by following the post above:

https://api.telegram.org/botYOUR_BOT_API_TOKEN/getUpdates

Assuming your bot API token is:

678918734:BCEwt6h1je_l9FBN684BNM-Eo4ja38wh740

An example of the full URL will be:

https://api.telegram.org/bot678918734:BCEwt6h1je_l9FBN684BNM-Eo4ja38wh740/getUpdates

Next, get the user who's chat ID you'd like to obtain, to send a message to your bot. Under the result object you'll have a list of numbers, click on the little arrow next to the number on the bottom of the list, and navigate to message > chat. You will see the chat id just above the first_name field. See the screenshot below:

chatid