Con l'API come si creano argomenti e post di proprietà di un determinato utente?

Importo i miei dati da file CSV utilizzando l’API.
Sto importando correttamente gli utenti. Sto importando correttamente anche le categorie, i topic e i post, tranne che al momento tutti i miei topic e post risultano creati da me, l’amministratore di Discourse del sito.

Non è chiaro come fare in modo che siano di proprietà dell’utente effettivo.

È necessario specificare l’utente corretto come Api-Username per ogni post? E in tal caso, significa che l’utente deve essere un amministratore (cosa che non lo sarebbe)?

Oppure devo creare i topic/post e passare un altro parametro per l’utente (che non riesco a vedere nella documentazione)?

O devo creare e poi modificare il post, specificando l’utente (anche in questo caso non vedo questa opzione)?

Grazie, Paul

2 Mi Piace

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 Mi Piace

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 Mi Piace

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

3 Mi Piace

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

2 Mi Piace

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