APIを使って特定のユーザーが所有するトピックや投稿を作成するにはどうすればよいですか

CSV ファイルからのデータの API を使用したインポートについてです。
ユーザーのインポートは成功しています。カテゴリ、トピック、投稿のインポートも成功していますが、現時点ではすべてのトピックと投稿が、サイトの Discourse 管理者である私によって作成されたものとして表示されています

実際のユーザーが所有者となるようにするにはどうすればよいのか、よくわかりません。

各投稿に対して、正しいユーザーを Api-Username として指定する必要があるのでしょうか?もしそうなら、そのユーザーは管理者である必要がありますか(実際にはそうではないはずですが)。

あるいは、トピックや投稿を作成する際に、ドキュメントには記載されていない別のパラメータでユーザーを指定するのでしょうか?

それとも、作成後に投稿を修正してユーザーを指定するのでしょうか(これもドキュメントにはそのようなオプションが見当たりません)。

よろしくお願いいたします。
Paul

「いいね!」 2

I tried passing user_id (and userid) as an extra post parameter when I create topic, but it had no effect.

Set the Api-Username to the username that you want to publish the post. Use the All Users API key for the Api-Key.

「いいね!」 4

Thanks, if I use such an api key can I use that for everything, or our there some things I can only do with key if restrict to single user.

「いいね!」 1

You can use the All Users API key for everything to do with importing your data.

「いいね!」 3

Ok, can confirm I have tried it and it works, thanks.

「いいね!」 2

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