Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete channel in Slack API

Tags:

slack-api

I am finishing development of API similar to Slack API, but with more/different features. I have to implement an API (more like command/endpoint) for deleting a room and I can't find anything like that in the documentation.

It seems that it can be done via webUI according to this help article.

But there is no method for it in Slack API methods.

I think there is only channels.archive with similar purpose, but it seems very strange not having a method to delete a room.

Is it really like that that room can't be deleted via Slack API?

like image 789
Lukas Salich Avatar asked Jan 29 '23 09:01

Lukas Salich


1 Answers

There is no method for deleting a channel in the official API, but there is the undocumented method channels.delete that has this exact functionality.

Basic usage is:

https://slack.com/api/channels.delete?token=TOKEN&channel=C12345678

Please note that undocumented methods are not officially supported by Slack and might change or stop working without any prior warning. Still, they are very useful and I have made a github to document all known undocumented methods. Please feel free to use and contribute.

like image 141
Erik Kalkoken Avatar answered Feb 01 '23 00:02

Erik Kalkoken