# The Android app needs to send HTTPS POST requests containing JSON data to my PHP API endpoint

**URL:** <https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549>\
**Category:** Hosting Support\
**Created:** [October 23, 2026, 10:54pm UTC](https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549 "2026-10-23T22:54:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![uchechukwujohn](https://forum.infinityfree.com/letter_avatar/uchechukwujohn/32/6_449c533f586939b6e5f246632a46421f.png) [@uchechukwujohn](https://forum.infinityfree.com/u/uchechukwujohn)\
**Post date:** [October 23, 2026, 10:54pm UTC](https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549/1 "2026-10-23T22:54:51Z")

</div>

### Website URL

[https://sabisale.free.je](https://sabisale.free.je)

### Error Message

Hello InfinityFree Support Team,

I am developing a Nigerian business management SaaS called SabiSale, hosted on InfinityFree.

Website: [https://sabisale.free.je/public/index.php](https://sabisale.free.je/public/index.php)

I am currently developing an Android application for a Moniepoint P8 POS terminal. The Android app needs to send HTTPS POST requests containing JSON data to my PHP API endpoint:

[https://sabisale.free.je/public/api/device-pair.php](https://sabisale.free.je/public/api/device-pair.php)

When the Android application calls this endpoint, it receives an HTML response containing “/aes.js” instead of the JSON response expected from my PHP script.

The endpoint is intended to return JSON responses for device pairing. The same issue also prevents me from testing the API properly with cURL.

Could you please clarify:

1. Does InfinityFree’s free hosting security system block direct API requests from Android applications?
2. Is there any supported way to allow direct JSON POST requests to my API endpoint without the JavaScript browser challenge?
3. If this is not supported on the free plan, is upgrading to [premium hosting](https://www.infinityfree.com/premium/) the only way to make my Android application communicate reliably with the PHP API?

I would appreciate your guidance because I would prefer to continue using InfinityFree if this functionality is supported.

Thank you.

### Other Information

pls help me out

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [October 23, 2026, 10:54pm UTC](https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549/2 "2026-10-23T22:54:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lemni](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/lemni/32/68303_2.png) [@Lemni](https://forum.infinityfree.com/u/Lemni)\
**Post date:** [October 23, 2026, 10:55pm UTC](https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549/3 "2026-10-23T22:55:04Z")

</div>

_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._

Yes, the security system is what’s stopping your Android app and cURL. The `/aes.js` page you get back is the free hosting browser check. Your request never reaches your PHP script.

Our knowledge base article says the check requires JavaScript and cookies. A tool or app that can’t run it gets a short HTML page that loads `/aes.js`, and the article lists Android and iOS apps, REST APIs and cURL as things that won’t work. To your three questions:

1. **Does it block direct API requests from Android apps?** Yes. The article says Android apps can’t connect to a site on free hosting, and that REST APIs and command-line tools like cURL are affected too.
2. **Is there a supported way to skip the challenge?** No. It covers every URL on the site and can’t be excluded for one path, file type, user agent or IP address. A custom domain doesn’t change this either, and it can’t be disabled on free hosting.
3. **Is [premium hosting](https://www.infinityfree.com/premium/) the only way?** The article’s answer is [premium hosting](https://www.infinityfree.com/premium/), which it says protects the site with less restrictive methods and lets mobile apps, APIs and automated tools work normally.

Here’s the article, with all the details:

> [@Browser Security System - Features and Limitations](https://forum.infinityfree.com/docs?topic=49353):
>
> InfinityFree uses a security system on all free hosting accounts to ensure your website is accessed by real web browsers, not bots or automated scripts. While this protects your site from malicious traffic, it can affect certain types of access. How the security system works The system checks that visitors can execute JavaScript and accept cookies: features that all modern web browsers support. This verification happens automatically and most website visitors will never notice it. You may occa…

Someone else asked almost the same thing a few days ago, for an Android chat app calling a PHP API. The knowledge base article above is the better source.

> [@PHP API requests blocked by JavaScript security challenge](https://forum.infinityfree.com/t/php-api-requests-blocked-by-javascript-security-challenge/121461):
>
> Website URL ttps://pkchat.freedev.app Error Message Connection reset by peer. Termux curl and Python requests receive a JavaScript security challenge instead of the API response. Other Information Website: [https://pkchat.freedev.app](https://pkchat.freedev.app) My PHP test API works in Chrome and returns JSON successfully. However, requests from Termux using curl and Python requests are blocked by a JavaScript security challenge or the connection is reset. API endpoints: [https://pkchat.freedev.app/api/test.php](https://pkchat.freedev.app/api/test.php)[https:/…](https://pkchat.freedev.app/api/send_otp.php)

---

<div class="post-metadata">

**Author:** ![Candev](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/candev/32/68287_2.png) [@Candev](https://forum.infinityfree.com/u/Candev)\
**Post date:** [October 24, 2026, 11:59am UTC](https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549/4 "2026-10-24T11:59:45Z")

</div>

1. Yes (for non-browser connections)
2. I think you can’t
3. In [premium hosting](https://www.infinityfree.com/premium/), there are no browser challenge so yes

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [October 31, 2026, 12:00pm UTC](https://forum.infinityfree.com/t/the-android-app-needs-to-send-https-post-requests-containing-json-data-to-my-php-api-endpoint/121549/5 "2026-10-31T12:00:07Z")

</div>

Closed on October 31, 2026, 12:00pm UTC

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