Skip to main content

conversations.inviteShared method

Welcome to the new home of Slack developer docs!

We're still building and not all features are available quite yet. Enjoy this peek into the future!

Not ready for the future? Return to the past at api.slack.com.

Usage info

This Slack Connect API method creates an invitation to a Slack Connect channel. The invitation can be sent to users or bots in another workspace either as a shareable URL or as an email invite.

The invited user must be known to your app (i.e., a channel is already shared between the organization your app is installed on and the organization of the user). If the channel to be joined is not already a Slack Connect channel, it becomes a Connect channel when you use this method to invite users from another workspace.

Response

With the user_ids argument

If you supply a user's ID via the user_ids argument, we'll send a notification to the recipient's Slack client for them to accept.

{
"ok": true,
"invite_id": "I02UKAJ6RJA",
"is_legacy_shared_channel": false
}

With the emails argument

If you supply a user's email via the emails argument, we'll send a transactional email to the recipient containing a URL that triggers joining the Slack Connect channel. Some fields are omitted if external_limited=true (see below).

{
"ok": true,
"invite_id": "I02UKAJ6RJA",
"is_legacy_shared_channel": false
}
Please note that even though the emails and user_ids arguments accept arrays, only one email or one user ID may be invited at a time.

With the external_limited argument

Setting this argument to true will send an invitation limiting recipient's actions to only sending messages. They will not be able to invite other members (or bots) from their organization into the channel. They will also not be able to export the channel history, change its visibility, or change the channel topic or name. The channel will be set as private in the guest workspace.

Since this argument defaults to true, your app will need to explicitly set it to false if you would like the recipient to have more control over the channel in their workspace.

The ability to send either Slack Connect invitation type is controlled by the workspace setting Manage permissions for inviting people to channels. If an invite is sent of a type your app does not have permission to send, the restricted_action error is returned. For example, if the workspace is configured to disallow users from sending invitations with permission to post, invite, and more, setting external_limited=false will return an error.

When external_limited=true, the conf_code and url fields are not returned in the success response.