2

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.

Marius
199k55 gold badges431 silver badges837 bronze badges
asked Jan 16, 2014 at 19:59
5
  • 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? Commented Jan 21, 2014 at 7:45
  • It is about a mobile application. I want to be able to login a customer through the mobile app. Commented Jan 21, 2014 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. Commented Jan 21, 2014 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. Commented Jan 21, 2014 at 22:37
  • 1
    Please post your solution as answer for future visitors and accept it to close the question. Thanks! Commented Feb 20, 2014 at 11:34

1 Answer 1

1

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.

answered Feb 17, 2014 at 18:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.