HTTPError: 403 Client Error: Forbidden
-
I have a python script that will update stock status and price of my products based on data from a different website.
I have created and API that was first assigned to an administrator profile in my woocommerce account and then to a shop manager profile (I tested this based on an answer I found here).
I am still getting the following error while trying to update the products:Traceback (most recent call last):
File “c:\Users\scraper.py”, line 134, in
products.raise_for_status()
File “C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py”, line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://lasmarias.ar/wp-json/wc/v3/productI have manually accessed the above url using the client and secret and was able to get a response.
Also disabled my plugins and that did not work
Have also compared headers from a manual request and my script and they do match. At this point I’m lost for options.
Would appreciate your help.
- The topic ‘HTTPError: 403 Client Error: Forbidden’ is closed to new replies.