# Issue: API returns JavaScript instead of JSON for non-browser clients

**URL:** <https://forum.infinityfree.com/t/issue-api-returns-javascript-instead-of-json-for-non-browser-clients/111770>\
**Category:** Hosting Support\
**Created:** [June 13, 2025, 4:56pm UTC](https://forum.infinityfree.com/t/issue-api-returns-javascript-instead-of-json-for-non-browser-clients/111770 "2025-06-13T16:56:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexandreSilva](https://forum.infinityfree.com/letter_avatar/alexandresilva/32/6_22734026db12803ebb3e059622ac3534.png) [@AlexandreSilva](https://forum.infinityfree.com/u/AlexandreSilva)\
**Post date:** [June 13, 2025, 4:56pm UTC](https://forum.infinityfree.com/t/issue-api-returns-javascript-instead-of-json-for-non-browser-clients/111770/1 "2025-06-13T16:56:47Z")

</div>

"Hello,

My API (PHP/Node.js) is returning an HTML page with JavaScript (verification challenge) to my Android app (OkHttp/Retrofit) instead of the API response. Since programmatic clients do not execute JS, the communication fails.

Is it possible to disable this JavaScript challenge for API accesses, or configure my domain/path for direct access without verification?

Thanks!"

---

<div class="post-metadata">

**Author:** ![anon90933456](https://forum.infinityfree.com/letter_avatar/anon90933456/32/6_22734026db12803ebb3e059622ac3534.png) [@anon90933456](https://forum.infinityfree.com/u/anon90933456)\
**Post date:** [June 13, 2025, 5:17pm UTC](https://forum.infinityfree.com/t/issue-api-returns-javascript-instead-of-json-for-non-browser-clients/111770/2 "2025-06-13T17:17:29Z")

</div>

Welcome back to the forum!

> [@Ensuring only web browsers can access your website](https://forum.infinityfree.com/t/49353):
>
> InfinityFree is a website hosting service. That means that the hosting accounts we provided are intended for hosting websites. Websites contain pages that are accessed through web browsers. InfinityFree is not intended to be used for file sharing, API hosting, database hosting or background tasks/tools. To help enforce this, free hosting enforces a security system that makes sure that anyone trying to access your website is using a normal web browser. This is done by checking whether the web br…

And, if you’re asking, it isn’t possible to disable the security system as it’s mandatory on all websites.

---

<div class="post-metadata">

**Author:** ![AlexandreSilva](https://forum.infinityfree.com/letter_avatar/alexandresilva/32/6_22734026db12803ebb3e059622ac3534.png) [@AlexandreSilva](https://forum.infinityfree.com/u/AlexandreSilva)\
**Post date:** [June 13, 2025, 6:04pm UTC](https://forum.infinityfree.com/t/issue-api-returns-javascript-instead-of-json-for-non-browser-clients/111770/3 "2025-06-13T18:04:29Z")

</div>

Thank you very much, I understand.

---

<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:** [June 20, 2025, 6:05pm UTC](https://forum.infinityfree.com/t/issue-api-returns-javascript-instead-of-json-for-non-browser-clients/111770/4 "2025-06-20T18:05:16Z")

</div>

Closed on June 20, 2025, 6:05pm UTC

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