jordan1909 is trying to use the Discourse API’s reporting functionality in a Node app on a different server but is getting a 404 error. codinghorror suggests rebuilding the docs site, but blake clarifies that the issue is with the endpoint URL being documented incorrectly.
jordan1909 tries the corrected endpoint but gets a raw dump of the page instead of JSON data. david suggests adding .json to the end of the URL, which resolves the issue initially, but jordan1909 encounters a 404 error again when making external API calls.
david asks if jordan1909 is including an API key in the Postman request. jordan1909 realizes the mistake was a typo in the API key parameter name, using ap_key instead of api_key.
So this works in my browser but I need to get the JSON data back for usage elsewhere and everytime I issue the query anywhere else I get a raw dump of the page?
Any idea what I’m missing? Issuing a GET request here.
I had previously marked this as solved however if I execute the request via Postman or in an Ajax query I am getting a 404. Is this available to the api for external calls? Am I missing something?
Does anyone have an example of getting this value via an Ajax request or even Postman?