Working on an Application with an API

I am encountering difficulties with my Flutter mobile application which is connected to an API hosted on InfinityFree. After successful deployment, the API call from the app’s login functionality results in unexpected HTML responses containing JavaScript. Despite ensuring correct PHP scripts and file uploads, the issue persists, impacting the login process. I suspect a mismatch between Flutter and the server environment. Any insights on resolving this JavaScript-in-HTML response and ensuring smooth API interactions would be greatly appreciated

InfinityFree is not intended to be used for API hosting, as there is a security system in place that ensures websites are being accessed from a browser:

If you have a custom domain, using Cloudflare might help, as some of the restrictions are not present when it’s used:


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