Error 403 forbidden

Website URL

http://mimmos.000.pe/varie/read.php?funzione=0

Error Message

Hi everyone, I’m going crazy because I don’t understand what the problem is…
By clicking on that url that I wrote, the response you get via the browser (for example Google Chrome) is: |0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0
and it’s perfect!! So no problem so far…

But if I do the exact same thing via the smartphone app (app created with appinventor and working for years on other hosting service sites) instead of answering the one or zero line as above, I get the answer:

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>

Other Information

I really can’t understand…
basically the app I made has a button which, if pressed, runs the URL I wrote and displays the response text which is the error written just now… even if I open a browser from my mobile phone and write the 'url the answer is correct… what am I doing wrong… what authorization should I remove?.. the files are all 777, inside the “miscellaneous” folder I put the index.html file…

I don’t know what else to do.

Thanks in advance
HI
Mauro

I believe your browser is being blocked by the security system:

10 Likes

Hi, thanks for the prompt response.

so the system realizes that the request was not made via browser and therefore responds with a 403 error?

while from chrome, I get the response because it is actually a browser?

did I understand right?

I’m sorry if I rewrote, I just don’t understand all the mechanisms very well and also I’m using a translator.

Do I have alternatives to this problem of mine?

A thousand thanks
HI

2 Likes

Yes, I believe so.

The security system requires JavaScript and cookies to be enabled on a browser, it presents the browser with a JavaScript challenge which, when solved by the browser, saves a cookie that allows you to progress. Does your AppInventor browser support executing JavaScript and storing cookies?

8 Likes

I enabled cookies (I saw that the web service that sends the URL has a box that was not enabled that says “enable cookies”)
now the response I get is practically the same but there is an extra line under

<hr><center>nginx</center>

Can this writing help?
Is this the code I should send back?

sorry, I’m trying them all at least to close the dream… that everything worked…

Hi maurofilippo,

If this is only happening in AppInventor2, you need to have a WebView Component going instead of the Web Component, as WebView runs JavaScript to get past the security challenge while Web only executes the request. WebView is a type of browser and yes you also need to enable Cookies in that to keep you going.

403 simply means your request is rejected. With the Web component, you might not be following redirections so the final response code is 403 instead of the 302 redirections to Google.

Let us know if that’s helping you proceed and let us know if you have any issues after making the change.

Cheers!

1 Like

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