Magento – Extending Magento API with customer login

apimagento-1.8soap

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.

Best Answer

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.

Related Topic