An easier way is to go to the Telegram web version and go to the chat whose identifier you want to find out. It will be in the url, which is in the form:
https://web.telegram.org/#/im?p=u<ID>_<something>
This also works for groups, but their identifiers are negative, so if the URL looks like
https://web.telegram.org/
then the chat group id is 1234567.
source share