When posting via the Discourse API, some users have encountered issues with specifying the correct category. dylanh724 initially had trouble with the category not being set correctly, despite using the correct category ID as a number. After trying different approaches, it was discovered that the category ID should be sent as a string, not a number. riking mentioned that supporting category IDs was an accident, and DeanMarkTaylor pointed out that the documentation recommends using integer category ID values. However, blake clarified that when creating a topic via the API, the category should be specified by ID, but as a string, not by name.
Whenever I post via the API, I tested it in Postman and it sends the right things to the right category.
However, when I more or less copy+paste the same thing with an http POST (via JavaScript), I get everything right…EXCEPT the category (which I thought was the easiest part):
Ahhhh apparently error 422 is rate-limiting. The category “number” IS actually “text” (a string). Making bot account admin seemed to do the trick for the limiting (…but why do I have to make it an ADMIN to edit rate limiting? Seems a bit of a dramatic upgrade for such) and “15” as the category as a string.
Ich wollte nur kurz klarstellen, dass Sie beim Erstellen eines Themas in einer Kategorie über die API die Kategorie nun per ID und nicht per Name angeben.