# 邀请已有账户的用户时出现API错误422

**URL:** <https://meta.discourse.org/t/api-error-422-for-invite-emails-to-users-with-existing-account/356168>\
**Category:** Product Support\
**Created:** [2025 年3 月 6 日 22:30 UTC](https://meta.discourse.org/t/api-error-422-for-invite-emails-to-users-with-existing-account/356168 "2025-03-06T22:30:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![Nick-Permaculture](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick-permaculture/32/317842_2.png) [@Nick-Permaculture](https://meta.discourse.org/u/Nick-Permaculture)\
发布日期： [2025 年3 月 6 日 22:30 UTC](https://meta.discourse.org/t/api-error-422-for-invite-emails-to-users-with-existing-account/356168/1 "2025-03-06T22:30:15Z")

</div>

您好团队，

我正在尝试通过 [Make.com](http://Make.com) 设置一个自动化，以便在用户从 Kajabi 购买新产品时自动邀请他们加入 Discourse，并将他们添加到新组中。

问题是，购买这些产品的大多数人（但不是全部！）已经在我们的论坛中拥有账户。根据我阅读的关于 422 错误的许多其他帖子，包括 2021 年的链接帖子，我认为错误发生是因为电子邮件已与 Discourse 中的账户关联。

> [@Error 422 when sending invite on 2.7.0.beta4](https://meta.discourse.org/t/error-422-when-sending-invite-on-2-7-0-beta4/181960):
>
> What can be the meaning of error 422 that I am getting when sending an invite (see attached, error shows at the top)? It is happening after updating to 2.7.0.beta4.

但是，自该帖子发布以来，随着邀请系统的更新，我原以为这不再是一个问题，并且我可以使用 .csv 手动批量邀请用户，即使他们已经拥有账户也可以将他们添加到组中，而不会引发错误，同时仍然向没有账户的用户发送邀请。

那么，我该如何解决这个问题？我正在使用来自 API 文档的邀请的标准 API 代码，并且它过去曾奏效。我刚刚克隆了 Make 中现有的（有效的）场景，并调整了组名和起始主题。供参考，这是我正在使用的 API 代码：

```plaintext
  {
  "email": "user@host.com",
  "skip_email": false,
  "max_redemptions_allowed": 1,
  "topic_id": 782,
  "group_names": "Group-Name"
}

```

将“skip\_email”部分中的“false”更改为“true”是否就这么简单？或者那样就不会向没有账户的用户发送邀请了吗？

我还看到了用于将用户添加到组的 PUT 函数，但我只处理从 Kajabi 通过 webhook 发送的电子邮件，并且我不确定如何设置一种方法来检查电子邮件以获取用户名来执行此操作，因为据我所知，我无法将电子邮件地址用于 PUT 函数。

感谢您的任何帮助！

---

_[View the full topic](https://meta.discourse.org/t/api-error-422-for-invite-emails-to-users-with-existing-account/356168)._
