I want to capture the chat conversation programmatically from Slack windows app. I have tried to figured out the chat logs location locally but it seems that Slack app does not store its chat history locally. Please let me know how could I capture the chat logs by using cpp or c#?
Thanks.
Your assumption about how the Slack desktop works is incorrect. The app is just a viewer, all the content is stored in the cloud, not locally.
You can indeed "capture" any chat log from Slack given you have the permission to do so. Slack has an API that offers this functionality among others. To retrieve the chat from a channel you want to call conversations.history
.
To get a token you need to create a Slack app and install that app into a workspace. Check out this link for more info on how to create a Slack app.
It's also possible to access the chat history of multiple Slack workspaces from one Slack app. For that each workspace has to install your Slack app once. During installation your Slack app will receive a newly generated token for the respective workspace, which it should store for later user.