• Took me 3 days to figure out that WordPress API required specific user-agents. Why be specific with user-agents? In what way does requiring a specific(s) user-agent help the API?

    And, what specific User-Agents does WordPress REST respond to?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I’m not aware of any such requirement. I’ve delved into the API source code quite a bit and have never seen any reference to user agents. What sort of API request appears to require specific user agents? I did a posts API request with a non-standard user agent and the API still worked fine. If I can replicate your experience, I’ll know where in source code to check and can likely answer your question if you are correct and there are specific requirements.

    It could be your theme or a plugin is altering how the API works. If you switched to a default twenty* theme and deactivated all plugins, does user agent still seem to make a difference?

    Checking user agents is a common security check. Do you have any security plugins active? What about server security outside of WP?

Viewing 1 replies (of 1 total)

The topic ‘REST API – User-Agent’ is closed to new replies.