Unable to create product in Magento using REST API

Some days back, we came across an issue. Products not being created in Magento using REST API. First we thought its something related to the hosting server and checked if the oAuth is installed properly which was working fine. Then tested locally with a php oAuth admin function and was a success and we could create a product.

The issue was rather simple. Someone has changed the admin url of the site which caused all those issues.

Normally, the the authentication URL reference will be as below.

$adminAuthorizationUrl = '<domain>/admin/oauth_authorize';

On changing the same to the following one, the issue got resolved.

$adminAuthorizationUrl = '<domain>/backend/oauth_authorize';

This entry was posted in Magento Developer Notes. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *