Hello @Piotr Kolodziej,
Thanks for reaching out!
I am able to get the chat details using this GET https://graph.microsoft.com/beta/users/{userId}/teamwork/installedApps/{appId}/chat
Graph API. I was not getting "Bad request" while trying to replicate your issue locally. Usually, this error occurs when the {app-installation-id} is invalid.
Please validate that you are using a valid bot id in place of {app-installation-id} in your API request. Please let me know if the issue still persists.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.