BAD CSRF on creating new topic via API

(Andrew Nickolas) #1

I’m trying to create topics dynamically via API, but receive a ‘BAD CSRF’ response.

This is how my Postman request looks like:

POST http://forums.{my_site}/posts.json
The body is: { 'title': 'New topic', 'raw': 'Test topic', 'category': '13', 'api_key': <my_api_key>, 'api_username': <my_admin_api_username> }.

I’ve also tried to run the ruby rake task using Net::HTTP as a client with the parameters above and it didn’t work. Similar topics didn’t help.