Can't verify CSRF token authenticity while creating topics

My curl looks as follows:

curl -X POST '' \
-H "Content-Type: multipart/form-data;" \
--form 'Api-Key="redacted"' \
--form 'Api-Username="redacted"' \
--form 'title="Test topic"' \
--form 'raw="Hey this is a topic."'

I get a [“BAD CSRF”] reply and the production logs say Can’t verify CSRF token authenticity. I checked this topic BAD CSRF on creating new topic via API but it is basically caused by a typo so I guess there is something different here. I double checked the api-key and the username and they are still active on the website. I would appreciate any suggestions that you may have. Thanks!

Hi, Your Curl request is giving 403 BAD CSRF error because Api-Key and Api-Username are not passed in the header along with Content-Type. Do this change and it will work.