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

Add support for admin_roles_{addAssignments|listAssignments|removeAssignments} methods #1313

Closed
csallen1204 opened this issue Dec 14, 2022 · 5 comments · Fixed by #1349
Closed
Labels
enhancement M-T: A feature request for new functionality Version: 3x web-client
Milestone

Comments

@csallen1204
Copy link

Not sure if this is a bug or not. Slack API documentation lists methods with the admin_roles prefix that contain some pretty important functions that I need to be able to do via Python:

https://api.slack.com/methods/admin.roles.addAssignments
https://api.slack.com/methods/admin.roles.listAssignments
https://api.slack.com/methods/admin.roles.removeAssignments

However, looking at the slack-sdk code, I don't see any references to these methods even though the API documentation says they exist. Do they have yet to be implemented?

@srajiang
Copy link
Member

srajiang commented Dec 14, 2022

Hey @csallen1204! We do need to add support for this in this SDK, and will update this issue when the the support is added.

For expediency now, you can use the general use client.api_call to use these methods.

       import os
       from slack_sdk import WebClient
       client = WebClient(token=os.environ['SLACK_API_TOKEN'])
       response = client.api_call(
           api_method='admin.roles.addAssignments',
           # ... required fields
       )
       assert response["ok"]

@srajiang srajiang added enhancement M-T: A feature request for new functionality and removed untriaged labels Dec 14, 2022
@srajiang srajiang changed the title Don't see client admin_role methods mentioned in API documentation Add support for admin_roles_{addAssignments|listAssignments|removeAssignments} methods Dec 14, 2022
@github-actions
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.

@github-actions
Copy link

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

@seratch seratch added this to the 3.x milestone Jan 30, 2023
@seratch seratch reopened this Jan 30, 2023
@sayefiqb
Copy link

sayefiqb commented Feb 5, 2023

@csallen1204 @seratch Cann you please assign this to me?

@seratch
Copy link
Member

seratch commented Feb 6, 2023

@sayefiqb Thanks for offering that! but I will work on this soon 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality Version: 3x web-client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants