Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a method to get the channel ID using the current channel name #1503

Open
1 of 9 tasks
angrychimp opened this issue Jun 4, 2024 · 10 comments
Open
1 of 9 tasks

Need a method to get the channel ID using the current channel name #1503

angrychimp opened this issue Jun 4, 2024 · 10 comments
Labels
auto-triage-skip duplicate An issue for the same purpose already exists, and a link is in the comments question M-T: User needs support to use the project server-side-issue

Comments

@angrychimp
Copy link

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)
@angrychimp
Copy link
Author

If there's already a pattern for this and I'm just completely missing it in the documentation, please let me know. Thanks!

@WilliamBergamin
Copy link
Contributor

HI @angrychimp thanks for writing in 💯

This is a less then ideal scenario, I do not know a simple workaround for this, but since this is a backend issue I would suggest asking for a fix via [email protected]

@WilliamBergamin WilliamBergamin added question M-T: User needs support to use the project and removed untriaged labels Jun 4, 2024
@amshamah419
Copy link

To add to this, we also are struggling with this issue and we typically run into the rate limit prior to getting the result we need. For us, this would reduce the api calls from hundreds down to one.

Copy link

github-actions bot commented Aug 5, 2024

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

@angrychimp
Copy link
Author

I absolutely wish to have this looked at. This is an ongoing concern and I routinely run into situations where an easy method to convert channel name to and ID would be far easier than scanning a full list of channels in a workspace

Copy link

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

@angrychimp
Copy link
Author

Commenting again to prevent this from being closed. Still hoping this gets looked at.

@zimeg zimeg added server-side-issue auto-triage-skip duplicate An issue for the same purpose already exists, and a link is in the comments labels Sep 28, 2024
@zimeg
Copy link
Member

zimeg commented Sep 28, 2024

Hi @angrychimp 👋 This is a popular feature request that I agree would be useful, but we can only recommend paginating the conversations.list method and filtering outputs from the SDK side of things. I understand all of the concerns with rate limits and that this isn't an ideal approach, but I can only echo messaging [email protected] 😓

I do think it's worth keeping this issue open too so others can +1 👍 in agreement, but we don't have other plans to share at the moment.

📚 For more reference, this has been mentioned in issues like: #405, #1066, #1158, #1495, and a few other times in other repos.

@etiennnr
Copy link

+1 to this.

For our usecase, we post messages and files to multiple channels (public and private). The conversation.list method returns only public channels (ref: #1312 and #1494). We've ended up just statically mapping the channels name to the id in config, which is far from ideal... And a method to provide the channel name as input and returns channels ID sounds pretty barebone / simple.

@zimeg You're saying this has been requested multiple times (since 2019...) and still no improvments or even just a timeline? This is even worst considering that this feature existed in channels.info which has been deprecated (not sure I understand the reason why BTW).

@filmaj
Copy link
Contributor

filmaj commented Oct 10, 2024

You're saying this has been requested multiple times (since 2019...) and still no improvments or even just a timeline?

This is correct. I kindly ask for your understanding that myself, zim and other Slack employees that engage in these public GitHub issues with y'all do everything we can to raise your feedback, but ultimately these decisions and prioritizations are not ours to make. The only recourse I can suggest is to have your voice be heard by emailing [email protected]. If I could make the decision, I would provide such an API for you and the countless other developers who have asked for this feature. Unfortunately, I cannot make that decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-skip duplicate An issue for the same purpose already exists, and a link is in the comments question M-T: User needs support to use the project server-side-issue
Projects
None yet
Development

No branches or pull requests

6 participants