If you use Slack in the browser (not their desktop app), you can create a browser extension which calls these APIs using the xoxc
token.
I have done exactly that, to make a browser extension which automatically removes old conversations from Slack's channel sections: github.com/Zwyx/chrome-slack-sections-cleaner
(Note: using Slack in the browser as a desktop app is easy: simply open your browser's menu and click "Install app" or "Create shortcut". I have always used Slack this way.)