Slack.Web.Admin.InviteRequests (SlackKit v1.0.0-alpha.0)

View Source

Summary

Functions

Approve a workspace invite request.

Deny a workspace invite request.

List all pending workspace invite requests.

Functions

approve(invite_request_id, optional_params \\ %{})

Approve a workspace invite request.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • invite_request_id - ID of the request to invite. ex: Ir1234

Optional Params

  • team_id - ID for the workspace where the invite request was made.

Errors the API can return:

  • already_processed - The invite_request_id passed has already been approved or denied.
  • failed_to_send_invite - The actual invite (separate from approval) failed to process. This may happen because the user is disabled, already in the team, etc.
  • feature_not_enabled - The Invite Request Admin APIs are not enabled for this team.
  • invalid_request - The invite_request_id passed is invalid.
  • not_an_admin - This token doesn't have admin privileges.
  • team_not_found - The team_id specified wasn't found.

See the Common Errors guide for errors returned by every Web API method.

deny(invite_request_id, optional_params \\ %{})

Deny a workspace invite request.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Required Params

  • invite_request_id - ID of the request to invite. ex: Ir1234

Optional Params

  • team_id - ID for the workspace where the invite request was made.

Errors the API can return:

  • already_processed - The invite_request_id passed has already been approved or denied.
  • feature_not_enabled - The Invite Request Admin APIs feature is not enabled
  • invalid_request - The invite_request_id passed is invalid.
  • not_an_admin - This token doesn't have admin privileges.
  • team_not_found - The team_id specified wasn't found.

See the Common Errors guide for errors returned by every Web API method.

list(optional_params \\ %{})

List all pending workspace invite requests.

API reference

Rate limit: Tier 2: 20+ per minute
Scopes:

View on docs.slack.dev ↗

Optional Params

  • cursor - Value of the next_cursor field sent as part of the previous API response ex: 5cweb43
  • limit - The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive ex: 100
  • team_id - ID for the workspace where the invite requests were made.

Errors the API can return:

  • feature_not_enabled - The Invite Request Admin APIs feature is not enabled
  • not_an_admin - This token doesn't have admin privileges.
  • team_not_found - The team_id specified wasn't found.

See the Common Errors guide for errors returned by every Web API method.