Cloudflare seems to block data from another website hosted in Cloudflare

I have two website hosted on cloudflare. I created a webservice in one website so I can call it from the other website. I get an error 500 from cloudflare when I call the webservice. However, there is no error when I call the webservice from my localhost. Any suggestions are welcome.

Thank you