Api problem

Website URL

https://seaitdtr.page.gd/

Error Message

My Flutter app needs to call the SEAIT DTR API directly. Requests to https://seaitdtr.page.gd/api/v1/\\* are receiving an HTML JavaScript/cookie verification challenge instead of JSON. Can direct mobile/API requests be allowed for these routes, especially POST /api/v1/auth/login? If this isn’t supported on my hosting plan, what hosting setup do you recommend for a PHP/MySQL API?

Other Information

I need it please

Welcome to the InfinityFree community forum! Good to have you here.

  • Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
  • Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
  • AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
  • Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

No, that isn’t supported on free hosting. The HTML page you’re getting is InfinityFree’s browser security check. It can’t be turned off for one route like /api/v1/auth/login, for a file type, or for a user agent.

The check requires JavaScript and cookies. A Flutter app making direct HTTP calls can’t run it, so it gets the HTML page (the one that loads /aes.js and sets a __test cookie) instead of your JSON. The request is stopped before it reaches your PHP code. The article lists mobile apps and REST APIs as things that won’t work on free hosting:

The article says the way around this is premium hosting. It protects sites with less restrictive methods, so mobile apps and APIs work normally. It doesn’t recommend any other specific setup, so I can’t tell you which one to pick for a PHP/MySQL API.

Premium hosting is described here:

Like the bot says: it’s not supported on free hosting. Any paid plan from iFastNet does support this though.