# Is there a way to post as an arbitrary user when creating a new post/topic using the Discourse API?

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-post-as-an-arbitrary-user-when-creating-a-new-post-topic-using-the-discourse-api/61477>\
**Category:** Product Support\
**Created:** [24. April 2017 um 00:25 UTC](https://meta.discourse.org/t/is-there-a-way-to-post-as-an-arbitrary-user-when-creating-a-new-post-topic-using-the-discourse-api/61477 "2017-04-24T00:25:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![john-lynch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/john-lynch/32/81514_2.png) [@john-lynch](https://meta.discourse.org/u/john-lynch)\
**Post date:** [24. April 2017 um 00:25 UTC](https://meta.discourse.org/t/is-there-a-way-to-post-as-an-arbitrary-user-when-creating-a-new-post-topic-using-the-discourse-api/61477/1 "2017-04-24T00:25:14Z")

</div>

My friends and I were heavy users of Google Spaces. When Google announced that they were shutting Spaces down, I successfully scraped the site to pull down all our topic/post data in an ad-hoc JSON format. I also started hosting a Discourse server so that we could carry on our conversations there without having to worry about someone pulling the plug on our community. (And, it’s been a great experience thus far; much thanks to the Discourse community.)

What I’d like to do now is to get these old posts into Discourse. My hope was that I would be able to use the Discourse HTTP API to do this so that I could write my tools in C#, where I’m most comfortable (my Ruby knowledge is shallow and rusty, having only ever used it for minor things). After scuffling around for a little bit, I have managed to create a new topic through the API, but the new topic is always posted under that “admin” account that I pass as the “api\_username” parameter to the API call. To be able to successfully import my old Spaces content, I need to be able to indicate which user created the topic/post. There doesn’t seem to be a way to do this using the API.

**So: how do I indicate which user created a topic/post when using the Discourse API?**

Am I missing something? Or am I going about this the wrong way? Is there a better way to import old content? Will I be able to do this using the API, or am I gonna have to get my hands dirty and run some Ruby code server side?

Any help greatly appreciated.

EDIT: I did try setting “api\_username” to be the username I wanted, but that did not seem to work, netting me a 403 error, I believe. Not all my users are admins, naturally.

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-way-to-post-as-an-arbitrary-user-when-creating-a-new-post-topic-using-the-discourse-api/61477)._
