Cannot access api even pass onetime opt in main page

When I set a wildcard subdomain like: * in zero trust access.
When accessing dev (main web) requires onetime otp authentication, we are past that step.
However, the site cannot continue because when calling api, cfloudflare asks for authentication again.

Looking forward to helping