• Hello all,

    I am trying to develop a mobile application for my website, and the REST api is wonderful so far.

    However, when I visit /categories wp endpoint, it returns a 404 and for the life of me I can’t understand why. I see in the dashboard that I have 37 categories. Also, when I visit /taxonomies, I only receive post_tag back. To me it looks like somehow categories are not correctly registered on my website. I tried on a few other websites, and it (/categories) works wonderfully. it’s something that I guess comes out of the box, but for me somehow it didn’t.

    Not quite sure how to debug this, any help would be appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You mean

    /wp-json/wp/v2/categories

    ? Thats accessable on my site. Also for

    /wp-json/wp/v2/taxonomies

    Could you try to disable plugins in your project?

    Thread Starter andrej1992

    (@andrej1992)

    Yes, that’s exactly what I mean.

    /taxonomies are also accessible for me, but it only returns “tags” as taxonomy, nothing like category or something.

    Disabling the plugins I don’t feel quite safe with, thinking I’m going to ruin the entire project (I’m actually a mobile dev, which just is building on top of a friend’s wordpress site, that’s active for quite some time now)

    Nothing should happen by pure deactivation. “Should” depends on the plugin developers. If you are unsure, make a backup first.

    Alternatively, you can also look at the plugins regarding their tasks. If a security plugin is included, that could be responsible for the blockage. Or in plugin for controlling REST API endpoints. Or a cache plugin. There are many possibilities.

    Another alternative would be to copy the project to your local machine and test it there.

    Thread Starter andrej1992

    (@andrej1992)

    Yeah I might just have to do that… Thanks for your help. The administrator must have purposefully disabled the /categories as a taxonomy or whatever since I can’t see it in under /taxonomies and under /categories it’s 404

    I’d understand something like a 401 or 403, but a 404 is really throwing me off.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘/categories returns an unexpected 404’ is closed to new replies.