Cloudflare Security Challenge blocking API requests (Solved)

Posted under Bugs & Features

When I try to make a request to an API endpoint, e.g. https://danbooru.donmai.us/posts.xml?tags=<tag_name>&limit=100 (and provide the appropriate auth headers), my script is getting hit with a Cloudflare security challenge (which being a script it obviously cannot complete.

Note that if I copy the API request into a browser, rather than using a script to make the request, it works fine and does not get challenged.

Has some additional requirement been added for API requests, like a user-agent string?