I am using module (in Magento that extends the default Mage/Product model by adding a new attribute named Status with a corresponding file named Status.php residing in Package\ModuleName\Model\Catalog\Product\Attribute. The Status attribute also extends Mage_Eav_Model_Entity_Attribute_Source_Abstract.

If I try to access the REST API for products on either my development and production servers (with the required OAuth parameters), i.e http://localhost/magento/api/rest/products causes a 500 internal error whiles every other rest endpoint do not fail.

How can I include the custom attribute in the REST API without causing 500 internal errors?

NB: I am using an OAuth consumer which has been verified and I am able to fetch products IFF the custom module is uninstalled

  • you need to pass admin token Commented Oct 20, 2018 at 19:37
  • Please read the NB I have appended
    – tejkweku
    Commented Oct 21, 2018 at 21:55

1 Answer 1


I was able to find the cause of the problem. An observer was set on catalog_product_collection_load_before. It called a function that tries to access the the details of the user through Mage::getSingleton('admin/session')->getUser(). Unfortunately, this returns null when it is a REST call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.