Web API for Org Admins
The method names of a portion of API Methods start with admin.
. These APIs are not available for all developers. They are supposed to be used by Enterprise Grid Organization administrators.
Call Web API for Org Admins
There is no difference regarding the ways to use those APIs except for necessary scopes.
String orgAdminToken = System.getenv("SLACK_ORG_ADMIN_TOKEN");
Slack slack = Slack.getInstance();
// Reset a user session
AdminUsersSessionResetResponse response = slack.methods(orgAdminToken).adminUsersSessionReset(r -> r
.userId(userId)
);
// Convert a channel to an Org channel
AdminConversationsSetTeamsResponse orgChannelResp = slack.methods(orgAdminToken).adminConversationsSetTeams(r -> r
.teamId("T1234567")
.channelId("C12345567")
.orgChannel(true)
);
// Slack App Approvals
AdminAppsApprovedListResponse response = slack.methods(orgAdminToken).adminAppsApprovedList(r -> r
.limit(1000)
.teamId("T1234567")
);
// There are more...!
You can look up the comprehensive list of admin APIs here. Also, checking the Javadoc and search by a keyword starting with admin
may be helpful to know methods to use.