slackapi / slackapi/python-slack-sdk
Need a method to get the channel ID using the current channel name
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4k
- Forks
- 857
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 16
Description
We need a way to get the channel ID when provided the current channel name as an input. Previously this could be done using the channels.info API method, but now with that method fully deprecated and disabled, we don't have any other reliable method of doing this. We could theoretically post a new message to the channel using chat.postMessage, which returns the channel ID, then remove that message, but this seems like overkill.
The use case is that a user provides a channel name as input, and we want to convert that channel name to an ID and store that ID for later use when posting messages. Obviously the name may change over time, so using the channel ID is ideal.
Category
- slack_sdk.web.WebClient (sync/async) (Web API client)
- slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- slack_sdk.models (UI component builders)
- slack_sdk.oauth (OAuth Flow Utilities)
- slack_sdk.socket_mode (Socket Mode client)
- slack_sdk.audit_logs (Audit Logs API client)
- slack_sdk.scim (SCIM API client)
- slack_sdk.rtm (RTM client)
- slack_sdk.signature (Request Signature Verifier)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the slack_sdk.web.WebClient sync and async entry points and review the existing channel-related methods. Compare the requested channel-name lookup with the deprecated channels.info and the chat.postMessage workaround; done means exposing a reliable way to obtain and store the channel ID without posting a temporary message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100