I followed a lot of tutorials about how to extend Magento API but I didn't figure it out why I always get "Invalid api path." My goal is to extend Mage_Customer_Model_Customer_Api in order to add a new method to login a customer in site. I don't know if something like that is possible, but I need at least to be able to add a new method which just returns a message.

  1. Can someone provide me a link where I can find a working module which extends Magento API?
  2. Is it possible what I want to achieve? Thank you,

Yeee..I figured out "Invalid api path." error. Instead of calling

$result = $client->call($session_id, 'gw_base_order.createandcapture');

it has to be

$result = $client->call($session_id, 'resource_name.createandcapture');

Wrong tuturial: Extending Magento API and others like this.

I still need an answer for the second question.

  • Can I ask why you need a new login method? If you configure the API user correctly you can access all customer data. What are you trying to accomplish? – Melvyn Jan 21 '14 at 7:45
  • It is about a mobile application. I want to be able to login a customer through the mobile app. – Denisa Jan 21 '14 at 15:47
  • I haven't looked into the API permissions lately, but I don't recall there being a concept of "my orders". So I am not sure that once you succeed logging the customer in, that it will have a sensibele ACL associated with it. I think this problem needs solving first, because it is easier to change new user registration to add an API user, then creating a new login method. – Melvyn Jan 21 '14 at 21:41
  • I don't think I get what is your suggestion. I am trying to figure out for the moment how to login a customer in the site through extended API. – Denisa Jan 21 '14 at 22:37
  • 1
    Please post your solution as answer for future visitors and accept it to close the question. Thanks! – Sander Mangel Feb 20 '14 at 11:34

The functionality of logging users in to access their data from a mobile app for example is more a case for OAuth. You can read more about OAuth in Magento here and about the configuration here.

The API's are more meant to exchange information not tied to a specific user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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