API Returning HTML Instead of JSON At Specific Routes?

If you visit a user’s activity page on Discourse and view the Network tab of your browser’s developer tools, you’ll see that a GET request is made to a URL similar to:

http://forum.example.com/user_actions.json?username=simon

Querying that URL through the API should return JSON.