Add managed challenge when fetching data

Hi, I really like the managed challenge protection of Cloudflare but I would like to implement it “programmatically”, let me better explain it. In one page of my website I need to fetch data from an api endpoint that I set up and that is proxied into Cloudflare DNS, when the user press a button the data are fetched and then are shown. I would like to protect the api endpoint from bots using Cloudflare managed challenge, so I would like to display the managed challenge when the user click the fetch button, then if the challenge is completed the request to the api is sent otherwise is discarded, is there a way to achieve this?
Thanks in advance for all the responses

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.