From what I can tell, there are many more routes available than what is documented above. If there is something that needs to be done programmatically, you can just inspect what network calls are made when you use the front-end interface to configure the site and then use those routes with a privileged username and api key to accomplish the same things programmatically. Does that sound right? The only issue I am observing is a “Can’t verify CSRF token authenticity” error in the logs, but the operation I tried seems to have completed successfully. Is that accurate?
I have not installed the Discourse API gem, rather I would like to send AJAX requests to the pre-existing Discourse web instance. Do I need the API gem to do this?
I can perform GET requests just fine, but for some reason performing a POST to “/posts” fails. I am adding the API key and api_username in the query string. I have enabled all of the CORS settings in the admin options as well as my app.yml file. I have also set the nginx headers to allow CORS.
It is failing at OPTIONS every time. Really not sure what I’m missing. Any help would be hugely appreciated.