Jump to content

Can't update or delete through webservice


Recommended Posts

Using a webservice key with all permissions on all entities, I can get all products, but I can't update or delete.

 

I receive

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /prestashop2/api/products
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

I tried using Prestasharp, Restsharp and with php files. I got the same answer.

 

I can, with my browser, access to the list of products... or the /api, and I see all permissions for products with the true value.

 

I checked permissions to files:

  • 644 for all, except .htaccess (664)
  • To folders: 755

 

The mysql user has all permissions for the mysql table.

Prestashop 1.6.0.9, new installation, with default data.

 

Any suggestions?

 

Thank you.

 

 

Link to comment
Share on other sites

I found out the reason of this error.

It's not because of Prestasharp.
I tried Restsharp, I tried other direct methods...

Finally, it was my hosting.
The .htaccess of my hosting (not the .htaccess from the Prestashop directory) was denying my POST and DELETE requests.


Thanks.

Link to comment
Share on other sites

×
×
  • Create New...