Prestashop 1.7 webservice login customer

2.6k views Asked by At

How to can I login customer via webservice in Prestashop 1.7

In Prestashop 1.6(In 1.7 not working):

    define('_COOKIE_KEY_', 'OXFQDX3YYM8MJH1RYGAQHH2LX79ZNRX');
    $md5_password = md5(_COOKIE_KEY_+password);

http://yourdomainname.com/api/customers/ ?filter[email][email protected] &filter[passwd]=$md5_password

1

There are 1 answers

1
Arley HR On BEST ANSWER

My solution:

check password with PHP:

1) Get customer by email:

http://domain.com/api/customers?filter[email][email protected]

2) verify "passwd":

password_verify(the_input_password, passwd);

PASSWORD_VERIFY DOCS:

http://php.net/manual/es/function.password-verify.php