# Discourse API，是否可以创建一个帖子的不同用户名？

**URL:** https://meta.discourse.org/t/discourse-api-is-it-possible-to-create-a-post-through-a-different-username/221952
**Category:** Support
**Created:** [2022年三月25日 09:47 UTC](https://meta.discourse.org/t/discourse-api-is-it-possible-to-create-a-post-through-a-different-username/221952 "2022-03-25T09:47:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Felixkruemel](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Felixkruemel](https://meta.discourse.org/u/Felixkruemel)
#### Post date: [2022年三月25日 09:47 UTC](https://meta.discourse.org/t/discourse-api-is-it-possible-to-create-a-post-through-a-different-username/221952/1 "2022-03-25T09:47:58Z")

</div>

我想使用我的管理员 API 密钥创建一个帖子，但使用不同的用户名。官方 API 文档 [Discourse API Docs](https://docs.discourse.org/#operation/createTopicPostPM) 中没有相应的字段。是否仍然可以通过某种方式实现？

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2022年三月25日 10:35 UTC](https://meta.discourse.org/t/discourse-api-is-it-possible-to-create-a-post-through-a-different-username/221952/2 "2022-03-25T10:35:15Z")

</div>

如果您拥有“所有用户”API密钥，则可以在`Api-Username:`标头中设置其应扮演的用户名。

请参阅API文档主页上的“身份验证”部分：[https://docs.discourse.org/](https://docs.discourse.org/)

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [2022年三月25日 13:29 UTC](https://meta.discourse.org/t/discourse-api-is-it-possible-to-create-a-post-through-a-different-username/221952/3 "2022-03-25T13:29:22Z")

</div>

如果你的管理员是管理员，而不仅仅是版主，你就可以使用帖子上的扳手图标中的“更改所有权”。

 ![Screenshots_2022-03-25-10-28-15](https://global.discourse-cdn.com/meta/original/3X/5/e/5eabae7ad819b6f77006483fdc88c3997b5dff0f.jpeg)

我记得还有一个插件可以让你用不同的名字发帖。

在这里：

> [@Discourse Staff Alias](https://meta.discourse.org/t/discourse-staff-alias/156202?u=heliosurge):
>
> discourse2Summary Discourse Staff Alias allows set groups to create topics and posts, as well as make edits, as an alias user.hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-staff-alias](https://github.com/discourse/discourse-staff-alias)open_bookInstall Guide [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) The [Discourse Staff Alias](https://meta.discourse.org/t/discourse-staff-alias/156202/1) plugin allows certain groups to create topics and posts, as well as make edits, as an alias user. This can be useful in situations where staff members need to respond to que…
