Skip to main content

user/invite method

Facts​


  • Description: Invite a user to the workspace
  • Method Access: POST https://charon.hackclub.com/user/invite
  • Authentication: Bearer Token in Authorization header
  • Content-Type: application/json

Arguments​

Required arguments​


ArgumentTypeDescription
emailStringThe email address of the user to invite
ipStringThe IP address of the user to invite

Optional arguments​


ArgumentTypeDescription
channelsArrayAn array of channel IDs to invite the user to. This will override the channels specified in Charon's settings.

Usage info​

This endpoint is used to invite a user to the Slack workspace as a multi-channel guest. If the user is already a member of the workspace, they will be added to the programs channels.

Response​

A successful response will return a JSON object with the following structure:

{
"ok": true,
"message": "",
}

Success Messages​

MessageDescription
user_invitedThe user has been successfully invited.
already_in_teamThe user is already in Slack, Charon has added them to the channels.

Error Messages​

Error CodeDescription
invalid_emailThe provided email address is not valid.
already_invitedThe user has already been invited.
unknown_errorAn unknown error occurred.

Other error codes could be returned if they are given by Slack. Do not use this as a comprehensive list of errors.