# 批量创建数千份邀请函

**URL:** <https://meta.discourse.org/t/creating-thousands-of-invitations-in-bulk/305271>\
**Category:** Product Support\
**Tags:** invites\
**Created:** [2024 年4 月 24 日 14:32 UTC](https://meta.discourse.org/t/creating-thousands-of-invitations-in-bulk/305271 "2024-04-24T14:32:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2024 年4 月 24 日 15:25 UTC](https://meta.discourse.org/t/creating-thousands-of-invitations-in-bulk/305271/2 "2024-04-24T15:25:43Z")

</div>

如果您认为在 Discourse 中存储地址比在其他任何地方存储地址更危险，这是一种隐私问题，那么您需要自己创建它们。如果您不喜欢 API，也可以通过 Rails 来实现：

```plaintext
i=Invite.generate(user, skip_email: true, max_redemptions_allowed: 1)

```

这将为您生成一个邀请密钥。

```plaintext
"/invites/#{i.invite_key}"

```

是相应的 URL。您可以将它们全部写入一个文件。

---

_[View the full topic](https://meta.discourse.org/t/creating-thousands-of-invitations-in-bulk/305271)._
