Migrating Content via API hangs after 3 topics

I’ve got some editorial content I’m migrating to Discourse via the API and have stood up a new, development instance of Discourse to test the migration against. I’m able to create three topics with replies but then on trying to create the fourth the request hangs.

I thought this was some spam/rate-limiting configuration so have gone through and disabled everything that seems associated with something that would intervene in a topic creation but the issue persists.

Is there any guidance for this scenario?

As I’m working against a brand new Discourse instance I have no members, so my migration program creates user accounts as needed for the topic/reply authors. In production the accounts will exist already.


1 Like

Oh, now I can’t migrate any new topics.
Is there a way to completely turn off all anti-spam features?

1 Like

Is there a reason you’re trying to use the API instead of one of the import scripts?

1 Like

I didn’t know the scripts existed to be honest.

My content is in a custom database. Thankfully I’m a developer so it’s easy enough to write a C# program to query the DB and use the API to create the topics/replies. Well, it was easy until some blocking functionality in Discourse kicked in :-/

1 Like

Are you getting an error message returned from Discourse when the request hangs?

Depending on the error message you are getting, you might be able to solve the problem by adding the skip_validation parameter to your API request. It should be set to true. With that parameter set, a lot of the checks that Discourse does to see if a post meets the criteria defined in your site settings are bypassed.


The request just hangs as far as I can see, though there is some logging functionality on the package I’m using to interact with the API. I’ll give that a go first to try and sniff out any error message.

The package doesn’t have an option for skipping validation. I may have to modify it to add the param in.

Thanks for the tip.

1 Like

Adding a


parameter to the post requests worked. Thanks @Simon_Cossar!


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