Why isn't API access working on my website?

If you’re trying to use APIs on your InfinityFree website and they’re not working, this is due to our browser security system that’s required on all free hosting accounts.

What’s happening?

InfinityFree uses a security system that requires JavaScript and cookies to access websites. APIs and automated tools typically can’t execute JavaScript or store cookies, so they get blocked by the security system.

When API clients try to connect, they usually receive a “403 Forbidden” error or a HTML response saying “This site requires Javascript to work.”

Which APIs are affected?

This affects any type of programmatic access to your website, including:

  • REST APIs endpoints hosted on your site
  • WordPress XML-RPC (used by many WordPress tools and plugins)
  • Third-party services trying to connect to your APIs
  • Webhook endpoints that external services try to call
  • Command-line tools like cURL trying to access your site

What are my options?

Use premium hosting: Our premium hosting doesn’t have this security restriction, so APIs work normally.

Use a different service: InfinityFree is designed for hosting websites, not APIs. If you need API hosting, consider using a service better suited for that purpose.

Make outbound requests instead: Your website can make API requests to external servers. Only inbound API requests to your site are blocked.

Use webhooks in reverse: Instead of external services calling your site, have your site periodically check external services or databases for updates.

Use a web browser: If you need to trigger actions on your website, you can do so through a regular web browser instead of automated scripts.

Why does this security system exist?

The security system protects your website from malicious bots and automated attacks. It also prevents bots from consuming your account’s resource limits, which could cause your site to be suspended.

This is especially important on free hosting where resource limits are quite low.

Need more information?

Learn more about how this security system works and what other features it affects in our comprehensive guide to the browser security system:

5 Likes