Creating thousands of invitations in bulk

I’m also guessing there’s no SSO auth that could be used.

In that case what @pfaffman suggested is the way to go.

Something like

user = User.find_by(username: 'system')
16000.times do
  i = Invite.generate(user, skip_email: true, max_redemptions_allowed: 1)
  puts "/invites/#{i.invite_key}"
  # write "/invites/#{i.invite_key}" to file
end

Would do. Start off with loops of 1 or 2 until you get working as you intend.

A lazy but OK way of doing this would be to just print them all (puts) and log your terminal session :smiley: