Questions tagged [http-status-code-403]

The 403 or "Forbidden" error message is a HTTP standard response code indicating that the request was legal and understood but the server refuses to respond to the request.

A 403 Forbidden may be returned by a web server due to an authorization issue or other constraint related to the request. File permissions, lack of encryption, and maximum number of users reached (among others) can all be the cause of a 403 response.

2271 questions
5
votes
1 answer

Requests to .htaccess should return 404 instead of 403

This is sort of a follow-up to Is there a way to force apache to return 404 instead of 403? which suggested RedirectMatch to 404 to accomplish this. It works perfectly fine for most of anything, however if I request: http://example.com/.htaccess I…
hakre
  • 193,403
  • 52
  • 435
  • 836
5
votes
2 answers

Receive 403 error when attempting to scrape page

my code below uses C# and HTMLAgilityPack to scrape a webpage and then uses WebClient to download a string from another webpage. This works great on localhost, but when I publish my code as an API service on Azure or execute it on a web hosting…
5
votes
3 answers

403 Client Error: Invalid or non-existent authentication information while uploading to Pypi with twine

403 Client Error: Invalid or non-existent authentication information occurs when uploading new module to pypi with Twine Win10 Pro 1803 Biuld 17134.1069 64 bit // Python 3.7.5 32 bit // pip 19.3.1 I successfully created tar. and whl. in the dist…
Gavrk
  • 295
  • 1
  • 4
  • 16
5
votes
0 answers

Python Request getting 403 response but Curl getting 200 response, what's going on?

I am getting a different response from python and curl, although each uses the exact same parameters. Python: import requests headers = { 'Accept-Language': 'en-US,en', 'Accept': 'text/html,application/xhtml+xml,application/xml', …
superdee
  • 637
  • 10
  • 23
5
votes
1 answer

Curl command succeeded but python requests get 403 Forbidden

I try to get a data from this website. I get the cUrl command: curl 'http://mayaapi.tase.co.il/api/report/filter?logo=0' -H 'Origin: http://maya.tase.co.il' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML,…
Nirgn
  • 1,879
  • 4
  • 23
  • 28
5
votes
1 answer

403 error from Github.js getSha for files above ~1MB in size

I'm getting a 403 error when I try to use Github.js to getSha (and subsequently getBlob) from files larger than ~1MB. Is there a limit to the file size? The code is below: var gh = new GitHub({ username: username, password: password }); //…
5
votes
2 answers

htaccess 403 Forbidden error was encountered while trying to use an ErrorDocument

I want to have a custom 403 page in my project. So I added these codes in a .htaccess file: Order deny,allow Deny from all Allow from 192.168.1.0/24 ErrorDocument 403 /403.htm But when the project runs from an out of rang IP, and 403 error must…
Mohammad Saberi
  • 12,864
  • 27
  • 75
  • 127
5
votes
1 answer

Intermittent 403s due to CSRF failure (Django 1.2.3)

I've got a slightly crazy/infuriating bug with a site and CSRF. We're running Django 1.2.3, Python 2.6 on Ubuntu with Apache2 + mod_wsgi and have been getting end users reporting 403 CRSF verification failures and 403s as a result. All our forms…
Steve Jalim
  • 11,989
  • 1
  • 37
  • 54
5
votes
3 answers

Amazon S3 - Returns 403 error instead of 404 despite GetObject allowance

I've set up my S3 bucket with this tutorial to only accept requests from specific IP addresses. But even though those IPs are allowed to do GetObject, they get 403 errors instead of 404 for any files that are missing. My updated bucket policy is…
Jos
  • 1,732
  • 3
  • 19
  • 39
5
votes
1 answer

AWS S3 redirect not working

I've just created a new bucket in AWS S3. I want to host some static files there but if they're not all there, redirect to my main server. Seems simple but I've followed the instructions with no luck. On the bucket I've given everyone view…
5
votes
4 answers

URL forbidden 403 when using a tool but fine from browser

I have some images that I need to do a HttpRequestMethod.HEAD in order to find out some details of the image. When I go to the image url on a browser it loads without a problem. When I attempt to get the Header info via my code or via online tools…
5
votes
2 answers

403 error when accessing API from server and not from browser

I am trying to access the Buxfer REST API using Python and urllib2. The issue is I get the following response: urllib2.HTTPError: HTTP Error 403: Forbidden But when I try the same call through my browser, it works fine... The script goes as…
johan855
  • 1,578
  • 4
  • 26
  • 51
5
votes
1 answer

Golang program for retrieving google+ Domain profile returns 403 Forbidden

Can you please help me with the below problem. I am just writing a simple code to retrieve my google+ Domain user profile. 1. I am using a google+ Domain Account with the domain name spaceandhow.com I have provided all the privileges as listed in…
5
votes
1 answer

WebAPI : 403 Forbidden after publish website

Alright, I'm having a tough time locating the problem since it works locally but after doing a publish the results are simply: Error Code: 403 Forbidden. The server denied the specified Uniform Resource Locator (URL). Contact the server…
Yenza
  • 440
  • 5
  • 19
5
votes
1 answer

java.io.IOException: Server returned HTTP response code: 403 for URL

I want to open a link from url : "http://www.kohls.com/search.jsp?search=jacket&submit-search=web-regular", sometimes i get: java.io.IOException: Server returned HTTP response code: 403 for URL. But it's ok when open the url using browser. Below is…
Ritesh Sinha
  • 820
  • 5
  • 22
  • 50