Getting 302 found error with CURL APIs

Hello,

I have 2 websites both are on cloudflare and I am using Curl to get data including PDF documents from one website and uploading it to another website but I am getting 302 FOUND error due to cloudflare security. Please help me out, how can I run APIs and uploading files from one website to another without deleting cloudflare access security.
Thank you!

Hi @balkar,

Are you having this issue with Cloudflare Access?
What seems to be happening is that you are getting redirected to the Access Login page.

If you want to use an API with Access, you need to use a Service token. Please refer to this documentation: Service tokens ยท Cloudflare Zero Trust docs