The discussion revolves around an issue with the Discourse API, specifically with the “Get specific posts from topic” endpoint. VincentAlse is trying to retrieve specific posts from a topic using the API but is receiving a 413 status code. After several attempts and suggestions from other users, RGJ points out that the issue is due to the API documentation being badly phrased, implying a POST request with a request body when it should be a GET request with query parameters.
RJG provides a corrected code example using params instead of data in the GET request, which resolves the issue. VincentAlse confirms that the solution works.
GET always has a query string and never has post data (that is why you are getting 413 payload too large, it does not expect any). When querying data from a server without making a change you’ll (almost) always use GET and not POST. So you should use params= instead of data=.
I think the docs for this specific API call are badly phrased (“Request Body schema” really indicates POST data) so I am moving this to Contribute > Bug and you don’t need to pay me anything.