# Create a topic/post as a user with api

**URL:** https://meta.discourse.org/t/create-a-topic-post-as-a-user-with-api/181677
**Category:** Support
**Created:** [March 2, 2021, 10:49pm UTC](https://meta.discourse.org/t/create-a-topic-post-as-a-user-with-api/181677 "2021-03-02T22:49:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jsouthall](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jsouthall](https://meta.discourse.org/u/jsouthall)
#### Post date: [March 2, 2021, 10:49pm UTC](https://meta.discourse.org/t/create-a-topic-post-as-a-user-with-api/181677/1 "2021-03-02T22:49:54Z")

</div>

I found some documentation that I can create posts as a user other than “system” as long as the api key used is set for “all users”.

i am testing this in postman and finding some issues. i can only do this with an admin user or “system”. queries with regular users in api-username header are returning 403 forbidden.

is this the case? do only admin users work in the api-username?

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/5/c51339b88f5ffabca3ef848de17298e7774e4bc1.png)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 3, 2021, 7:05pm UTC](https://meta.discourse.org/t/create-a-topic-post-as-a-user-with-api/181677/2 "2021-03-03T19:05:48Z")

</div>

> [@jsouthall](#):
>
> do only admin users work in the api-username?

As long as the username you have set for the `Api-Username` belongs to an existing user that has permission to create a post in the category you are posting to, you can use the username as the `Api-Username` along with an All Users API key.

---

<div class="post-metadata">

### Author: ![jsouthall](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jsouthall](https://meta.discourse.org/u/jsouthall)
#### Post date: [March 5, 2021, 7:12pm UTC](https://meta.discourse.org/t/create-a-topic-post-as-a-user-with-api/181677/3 "2021-03-05T19:12:50Z")

</div>

Thanks Simon  
The piece I missed is “As long as the username … has permission to create a post in the category”.  
It is working now!  
thanks  
-Justin

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 4, 2021, 7:13pm UTC](https://meta.discourse.org/t/create-a-topic-post-as-a-user-with-api/181677/4 "2021-04-04T19:13:45Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
