Modify the API settings only in a specific context?

Hi. I would like to import a lot of topics/messages into Discourse. To do this I use the API.
In order to do that without any issue, I’d like to modify various API settings, but I don’t want to modify the global settings to do so. I just want to remove the limit for that specific task or user, but not in other contexts. Is such a thing possible?

If it’s a new forum, then you want to use an importer script rather than the API.

If you use an admin user with the API, most limits are not imposed.


Thank you for your reply. Is there a way to use an admin API as api_username but assign a different message author in the parameters?

There are some threads about that. I don’t remember much other than it was difficult. I think what you do is create it as the admin and then change the owner, maybe.

Is this something that you will want to do always throughout the course of using Discourse, or is it a one-time thing? If it’s the latter, you really, really want to use an import script rather than the API.

1 Like

Yes, it is possible. Try to play around with the code and explore the documentation. Still it is better to use import script specially if you have large amount of data.