'Shopify password update using Shopify API

Can we update password for a User or Customer that already exists in Shopify using the Shopify API?



Solution 1:[1]

The User endpoint is available for Shopify Plus stores, but it is currently read only - no user management is possible via this API

https://docs.shopify.com/api/reference/user

Solution 2:[2]

Although the API documentation does not say anything about changing the customer password, you can do actually change the customer password using the PUT /admin/customers/#{id}.json endpoint. Note that my answer is only for customers and not for users.

I have tested it, successfully changed the customer password and log in on the store with the new password. During my tests I used a private app and a normal app both with successful results.

Example:

PUT /admin/customers/5206361102.json

Body:

{
  "customer": {
    "id": 5206361102,
    "password": "mypass2",
    "password_confirmation": "mypass2"
  }
}

If you need the customer id you can use the the GET /admin/customers/search.json end point to find it.

For example you can get the id from the results of this:

GET /admin/customers/search.json?query=email:[email protected]

Result:

{
  "customer": {
    "id": 5206556238,
    ... other parameters ...
  }
}

Thank you to @spviradiya for the comment that pointed me out to this answer, I have tested it and implemented it into my project.

Solution 3:[3]

        PUT /admin/customers/#{id}.json
    {
      "customer": {
        "id": 207119551,
        "password": "newpass",
        "password_confirmation": "newpass",
        "send_email_welcome": false
      }
    }

Solution 4:[4]

NO, its not possible for now in the normal shopify store API. May this type of feature they expanding in to the next plus version but to be honest Plus is costly so very rare people using it compare to normal shopify store.

Solution 5:[5]

If You want to update password of your store's customer using shopify Api then yes it is possible. Here is Sample Code:-

$password = array(
          "customer"=>array(
              'id'=>$customerid,
              'password'=> $new_password,
              'password_confirmation'=>$confirm_password    

          )
      );
$customer = $shopify("PUT /admin/customers/$customerid.json" , $password);

You can update shopify store's customer password this way. But if you are talking about user then this API us only available for shopify plus store.check this link:- https://help.shopify.com/api/reference/plus/user

Thanks

Solution 6:[6]

NO,

Still in 2019 it is not possible it is just read only. Even you can visit this link

Solution 7:[7]

If you want to update the password of your user using the shopify API please try to use the below code:-

$updatePassword = array(
          "customer"=>array(
              'id'=>$userId,
              'password'=> $updatedPassword,
              'password_confirmation'=>$confirm_updatedPassword,
              'send_reset_password_email': true    

          )
      );
$updateCustomer = $shopify("PUT /admin/customers/$userId.json" , $updatePassword);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 football
Solution 2 Community
Solution 3 Abhijit
Solution 4 Chetan Sheladiya
Solution 5 Gurpreet Singh
Solution 6 Adam Strauss
Solution 7 Dotsquares