Hello,
I'm having a strange problem. I made a connection to Magento 2 Rest API (I tested Magento 2.0) and it worked perfectly.
Yesterday, a friend of mine that has Magento wanted to try my connection from my software to magento, but I'm having problems with some functions that before were working, now give me the following message:
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method {PUT/DELETE} is not allowed for the URL xxXXXxx
I've checked the documentation here:https://devdocs.magento.com/guides/v2.0/rest/list.html and the API has not removed these one:
Some of them that are giving me problems:
DELETE /V1/taxClasses/:taxClassId
PUT /V1/products/:productSku/stockItems/:itemId
The strange thing...is that the other ones are working ok, I can create a taxClass, I can create a product, but some API calls are not working.
I've double checked the API calls, checked the documentation to see if there were changes between version 2.0 and 2.2 and nothing about that.
What can I do??
Solved! Go to Solution.
Ok,
I've installed a local version of magento 2.2 and it is working ok on me. I've checked all permissions on that server and they are ok, so I must understand that they have a problem that I'm not sure how to explain.
make sure the authentication credentials you are using are associated with the user who has the permission to call that endpoint and edit the stuff you are trying to. and also if you are using tokens then they have expiry, make sure its good and have not expired