module Slack::Web::Api::Endpoints::UsersAdmin

Public Instance Methods

users_admin_invite(options = {}) click to toggle source

Send an invitation to a new user by email (undocumented)

@option options [Object] :email

Email address of the new user

@option options [Object] :channels

Comma-separated list of IDs (not names!) for channels, which the new user will auto-join. Both channel IDs for public channels and group IDs for private chanels work.

@option options [Object] :first_name

Prefilled input for the "First name" field on the "new user registration" page.

@option options [Object] :last_name

Prefilled input for the "Last name" field on the "new user registration" page.

@option options [Object] :resend

Resend the invitation email if the user has already been invited and the email was sent some time ago.

@option options [Object] :restricted

Invite a guest that can use multiple channels

@option options [Object] :ultra_restricted

Invite a guest that can use one channel only

@see github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.invite.json

# File lib/slack/web/api/endpoints/users_admin.rb, line 27
def users_admin_invite(options = {})
  throw ArgumentError.new('Required arguments :email missing') if options[:email].nil?
  logger.warn('The users.admin.invite method is undocumented.')
  post('users.admin.invite', options)
end
users_admin_setInactive(options = {}) click to toggle source

Disable a user (undocumented)

@option options [user] :user

User to disable

@see github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.setInactive.json

# File lib/slack/web/api/endpoints/users_admin.rb, line 39
def users_admin_setInactive(options = {})
  throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
  logger.warn('The users.admin.setInactive method is undocumented.')
  post('users.admin.setInactive', options)
end